Skip to content

Instantly share code, notes, and snippets.

@steezeburger
Forked from ikbear/idle.sh
Last active December 5, 2018 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steezeburger/32536b379ea98d4003020d0145fe9fcb to your computer and use it in GitHub Desktop.
Save steezeburger/32536b379ea98d4003020d0145fe9fcb 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