Skip to content

Instantly share code, notes, and snippets.

@ryanuber
Last active January 12, 2021 21:54
Show Gist options
  • Save ryanuber/bc310621d7ec3e154b6cc9392577afb9 to your computer and use it in GitHub Desktop.
Save ryanuber/bc310621d7ec3e154b6cc9392577afb9 to your computer and use it in GitHub Desktop.
Docker Desktop double INT
FROM ubuntu:20.04
COPY sig.sh /sig.sh
RUN chmod +x /sig.sh
STOPSIGNAL SIGINT
ENTRYPOINT ["/sig.sh"]
#!/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