Docker Community Forums

Share and learn in the Docker community.

Container destroyed after Docker stop

I am running Docker Desktop version (engine 19.03.4) on Windows 10 1903.

  • Windows container mode
  • Experimental On

I am trying to copy files into a Windows container.

Steps to reproduce the issue:
1 - The Docker Run is ok using
2 - Docker PS display my container
3 - I can browse a website hosted on my container.
4 - I docker stop the container
5 - docker cp fails with No such container.
6 - in the Docker events:
– container kill
– container die
– network disconnect
– container stop
– container destroy

Why the container is automatically destroyed after stop? I found nothing in the documentation explaining this.

Have you an idea?

PS: as long as the container is not stopped, it successfully works.

You probably know containers are not “persistent” and if you want to run a website, for example, you should create/mount persistent directories for both apache and mysql, let’s say.

Thanks but it should persists to a Stop and a Start accordingly to the doc:

The extend of my knowledge ends with , and I’ve just google that there is no “checkpoint” support on Windows, which would be the other semi-preferred to “pause” a container . But you may be right, that auto-destroy is a bit suspicious :slight_smile:

It seems to be by design for the Windows containers only. On the same machine, same Docker Desktop version a linux container is not destroyed after stop.

This is a real problem in fact because when Windows got updates, the container is destroyed and when Docker get update the container is also destroyed.

Just lost all containers after a Docker update on a Windows 10 host