-
-
Save steezeburger/32536b379ea98d4003020d0145fe9fcb to your computer and use it in GitHub Desktop.
Docker image entrypoint idle script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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