Skip to content

Instantly share code, notes, and snippets.

@ptone
Forked from ikbear/idle.sh
Created July 8, 2019 16:10
Show Gist options
  • Save ptone/cf4fcfac17c2734abb559f95539cbcb6 to your computer and use it in GitHub Desktop.
Save ptone/cf4fcfac17c2734abb559f95539cbcb6 to your computer and use it in GitHub Desktop.
Docker image entrypoint idle script
#!/bin/bash
echo "This is a idle script (infinite loop) to keep container running."
echo "Please replace this script."
cleanup ()
{
kill -s SIGTERM $!
exit 0
}
trap cleanup SIGINT SIGTERM
while [ 1 ]
do
sleep 60 &
wait $!
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment