Created
December 2, 2020 16:00
-
-
Save pierrebeaucamp/4f56cc43cadf22f214215d6abd7e2742 to your computer and use it in GitHub Desktop.
Docker stopsignal debugging
This file contains hidden or 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
FROM ubuntu:latest | |
COPY signals.sh signals.sh | |
ENV STOPSIGNAL=SIGTERM | |
STOPSIGNAL ${STOPSIGNAL} | |
ENTRYPOINT ["/bin/bash"] | |
CMD ["./signals.sh"] |
This file contains hidden or 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
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