Skip to content

Instantly share code, notes, and snippets.

@pierrebeaucamp
Created December 2, 2020 16:00
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 pierrebeaucamp/4f56cc43cadf22f214215d6abd7e2742 to your computer and use it in GitHub Desktop.
Save pierrebeaucamp/4f56cc43cadf22f214215d6abd7e2742 to your computer and use it in GitHub Desktop.
Docker stopsignal debugging
FROM ubuntu:latest
COPY signals.sh signals.sh
ENV STOPSIGNAL=SIGTERM
STOPSIGNAL ${STOPSIGNAL}
ENTRYPOINT ["/bin/bash"]
CMD ["./signals.sh"]
trap "echo sigterm; exit 0" TERM
trap "echo sigquit; exit 0" QUIT
echo stopsignal is \"$STOPSIGNAL\"
echo waiting
while true; do sleep 1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment