Docker Community Forums

Share and learn in the Docker community.

Why my Docker container writable layer can be persist when the container exited?


(Ccieliu) #1

Please reference below link from the official docker

As you can see, docker docs said, “The data doesn’t persist when that container is no longer running”.
But WHY the container didn’t remove the data when i stop the container?And this issue can be reproduced on different host.

  • The data doesn’t persist when that container is no longer running, and it can be difficult to get the data out of the container if another process needs it.
  • A container’s writable layer is tightly coupled to the host machine where the container is running. You can’t easily move the data somewhere else.
  • Writing into a container’s writable layer requires a storage driver to manage the filesystem. The storage driver provides a union filesystem, using the Linux kernel. This extra abstraction reduces performance as compared to using data volumes, which write directly to the host filesystem.

Please click here to reference this action logs