Docker Windows Server Core Container immediately stops after start and disappears

Viewed 507

I am trying to run a docker container with the mcr.microsoft.com/windows/servercore:1803 image but the container immediately stops and sometimes disappears.

My system:

  • Windows 10 Pro 1809
  • Docker version 19.03.8, build afacb8b
  • Hyper-V is enabled and Docker is configured to use Windows containers

Steps to reproduce:

  1. docker pull mcr.microsoft.com/windows/servercore:1803
  2. docker run mcr.microsoft.com/windows/servercore:1803
  3. docker ps -a

The newly created container is shown as exited in the list:

CONTAINER ID        IMAGE                                       COMMAND                    CREATED             STATUS                      PORTS               NAMES
75283da7c6fa        mcr.microsoft.com/windows/servercore:1803   "c:\\windows\\system32…"   8 seconds ago       Exited (0) 5 seconds ago                        infallible_goldwasser

If I use the option restart=alaways in step 2, the container continuously restarts. If I use the option -it in step 2, the container is up as long as I am in the interactive mode. As soon as I quit the interactive mode, the container stops.

Sometimes the container completely disappeares after it stops. But I cannot reproduce it right now.

Does anybody have this issue too? Does anybody know the reason for this behaviour? Does anybody know how to solve it?

EDIT:

Little change to title because it was wrong.

0 Answers
Related