How can copy work on stopped container?

Hi guys,

Data inside of a container is not persistent, so how can we copy contents from a stopped container to the host for example? How does that work?

Thanks

Hi @Xavier.Vieira

Data inside a container is persistent, until you delete the container.

Doing docker stop is like shutting down a normal computer. When you do docker start on the same container, it resumes with everything done so far still intact. The container’s file system is stored in files on the host machine.

docker container rm will delete everything.

Hum ok that makes sense. Thanks for the explanation.