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
docker stop correctly sends Windows containers CTRL_SHUTDOWN_EVENTif there is no TTY (-t option). If docker stop is used on a container run with -t, then no console control event is sent to the container.
Steps to reproduce the issue:
Build a console app that listens for console control signals.
Run the app in a Windows docker container, passing the -t flag.
When stopping the container with docker stop, the application does not receive CTRL_SHUTDOWN_EVENT. Instead, it's killed after the 10-second timeout.
Describe the results you expected:
Application receives CTRL_SHUTDOWN_EVENT.
Additional information you deem important (e.g. issue happens only occasionally):
Linux containers do not have this problem; they can shutdown cleanly regardless of whether they were run with -t.
Windows containers only have this problem if the -t command line parameter is used to run them. If they are run without-t, then they get the CTRL_SHUTDOWN_EVENT just fine.
Output of docker version:
Client: Docker Engine - Community
Version: 19.03.5
API version: 1.40
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:22:37 2019
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.5
API version: 1.40 (minimum version 1.24)
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:36:50 2019
OS/Arch: windows/amd64
Experimental: false
(migrated from docker/for-win#5996)
Description
docker stop
correctly sends Windows containersCTRL_SHUTDOWN_EVENT
if there is no TTY (-t
option). Ifdocker stop
is used on a container run with-t
, then no console control event is sent to the container.Steps to reproduce the issue:
-t
flag.Repro available here
Describe the results you received:
When stopping the container with
docker stop
, the application does not receiveCTRL_SHUTDOWN_EVENT
. Instead, it's killed after the 10-second timeout.Describe the results you expected:
Application receives
CTRL_SHUTDOWN_EVENT
.Additional information you deem important (e.g. issue happens only occasionally):
Linux containers do not have this problem; they can shutdown cleanly regardless of whether they were run with
-t
.Windows containers only have this problem if the
-t
command line parameter is used to run them. If they are run without-t
, then they get theCTRL_SHUTDOWN_EVENT
just fine.Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Physical box, Windows 10.0.18362 Build 18362
The text was updated successfully, but these errors were encountered: