Skip to content

Commit ecda6c3

Browse files
author
Kingdon Barrett
committed
Docker attach behavior on exit
Something changed recently and it's causing commits to abort because 'docker attach' is exiting with $?=1 failed status. I am pretty sure that exiting with a failed status should not abort the commit, so adding a ||/bin/true where the 1 comes out
1 parent 44dad00 commit ecda6c3

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

init-boat

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ docker rm $CONT || /bin/true
1515
ID=$(docker run -p $ADDR -p $ADDR2 --name $CONT -d -i -t $SHIP /.urbinit)
1616
echo $ID > $LOCKFILE
1717
#docker attach $ID
18-
docker attach $CONT
18+
docker attach $CONT || /bin/true
1919
docker commit $CONT $SHIP > $LOCKFILE
2020

2121
~/bin/init-yacht-stop $SHIP

init-ship

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ docker rm $CONT || /bin/true
1313
ID=$(docker run --name $CONT -d -i -t $SHIP /.urbinit)
1414
echo $ID > $LOCKFILE
1515
#docker attach $ID
16-
docker attach $CONT
16+
docker attach $CONT || /bin/true
1717
docker commit $CONT $SHIP > $LOCKFILE
1818

1919
~/bin/init-yacht-stop $SHIP

init-yacht

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ docker rm $CONT || /bin/true
1313
ID=$(docker run --name $CONT -d -i -t $SHIP /.urbinit)
1414
echo $ID > $LOCKFILE
1515
#docker attach $ID
16-
docker attach $CONT
16+
docker attach $CONT || /bin/true
1717
docker commit $CONT $SHIP > $LOCKFILE
1818

1919
~/bin/init-yacht-stop $SHIP

init-yacht2

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ docker rm $CONT || /bin/true
1313
ID=$(docker run --name $CONT -d -i -t $SHIP /.urbinit)
1414
echo $ID > $LOCKFILE
1515
#docker attach $ID
16-
docker attach $CONT
16+
docker attach $CONT || /bin/true
1717
docker commit $CONT $SHIP > $LOCKFILE
1818

1919
~/bin/init-yacht-stop $SHIP

0 commit comments

Comments
 (0)