Skip to content

Commit 08a3acc

Browse files
authored
fix: Not sleeping for infinity in docker container (#117)
1 parent 688746d commit 08a3acc

File tree

1 file changed

+8
-3
lines changed
  • docker/fsroot/usr/local/bin

1 file changed

+8
-3
lines changed

docker/fsroot/usr/local/bin/entry

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,16 @@ if tty -s; then
6464
if [ "$#" -eq 0 ]; then
6565
tmux
6666
else
67-
/bin/bash "$@"
67+
# If a command was passed to the container, execute it
68+
"$@"
6869
fi
6970
else
70-
# Sleep until we need to shut down.
71-
sleep infinity
71+
# If it's not a TTY, it's likely a CI/CD job, in which case that job will
72+
# keep the container open after the end of this script. If there's ever a
73+
# use case for keeping the container alive when not in a TTY, this could be
74+
# changed
75+
yl "Not a TTY, exiting..."
76+
exit 0
7277
fi
7378

7479
grn "Stopping experiment... "

0 commit comments

Comments
 (0)