You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
Running a container in the foreground via docker run and pressing ctrl-c sends exactly one signal (defined by STOPSIGNAL in the Dockerfile) to the running process.
Actual behavior
Two signals are sent to the running container, causing undesired behavior in the running application. Running with -it (interactive, TTY) produces a single signal, as expected.
Information
Is it reproducible? Yes
Is the problem new? Yes - this seems to have been a behavior change at Docker Desktop 2.4.0. Prior versions send a single signal as expected.
Did the problem appear with an update? Versions from 2.4.0 onward exhibit the unexpected multiple signals behavior.
macOS Version: 10.15.7
Steps to reproduce the behavior
Create a Dockerfile with the following content:
FROM ubuntu:20.04
COPY sig.sh /sig.sh
RUN chmod +x /sig.sh
STOPSIGNAL SIGINT
ENTRYPOINT ["/sig.sh"]
Create a script file sig.sh with the following content: