Last active
January 12, 2021 21:54
-
-
Save ryanuber/bc310621d7ec3e154b6cc9392577afb9 to your computer and use it in GitHub Desktop.
Docker Desktop double INT
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
FROM ubuntu:20.04 | |
COPY sig.sh /sig.sh | |
RUN chmod +x /sig.sh | |
STOPSIGNAL SIGINT | |
ENTRYPOINT ["/sig.sh"] |
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 | |
trap "register" INT | |
register() { | |
echo "INT" | |
[ -z "$SIG" ] && SIG=1 || exit | |
} | |
while true; do | |
sleep 100 & | |
wait | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment