Skip to content

Instantly share code, notes, and snippets.

@ledil
Forked from ikbear/idle.sh
Created July 5, 2017 12:29
Show Gist options
  • Save ledil/ce8a62e7e5416ddebe84b061846bc8d8 to your computer and use it in GitHub Desktop.
Save ledil/ce8a62e7e5416ddebe84b061846bc8d8 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