Skip to content

Instantly share code, notes, and snippets.

@eshleebien
Forked from ikbear/idle.sh
Created August 9, 2018 00:12
Show Gist options
  • Select an option

  • Save eshleebien/0745800ef1bcecea5908b1656173e6ff to your computer and use it in GitHub Desktop.

Select an option

Save eshleebien/0745800ef1bcecea5908b1656173e6ff 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