beginnerStorage: Volumes, Bind Mounts & tmpfs

What happens to a named volume when its container is removed?

Nothing — the volume is an independent Docker object with its own lifecycle, separate from any container. docker rm removes the container and its writable layer; the named volume and its data persist until explicitly removed with docker volume rm (and only if no other container references it).

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full DevOps Mastery library.

What happens to a named volume when its container is removed?

Next Step

Continue to What is an anonymous volume and why can it be a problem?← Back to all Docker questions