Skip to content

Instantly share code, notes, and snippets.

@ikbear
Last active April 18, 2021 10:00
Show Gist options
  • Star 23 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save ikbear/56b28f5ecaed76ebb0ca to your computer and use it in GitHub Desktop.
Save ikbear/56b28f5ecaed76ebb0ca 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