Docker volumes: persistent data managed by Docker
Answer: Volumes are persistent storage mechanisms managed by the Docker daemon. They retain data even after the containers using them are removed. (S2)
Why data needs a volume
- By default all files created inside a container are stored on a writable container layer that sits on top of the read-only, immutable image layers. (S2)
- Data written to the container layer doesn't persist when the container is destroyed. (S2)
- No matter which type of mount you choose to use, the data looks the same from within the container. (S2)
How volumes work
- You can create a volume explicitly using the docker volume create command, or Docker can create a volume during container or service creation. (S1)
- When you create a volume, it's stored within a directory on the Docker host, and that directory is what's mounted into the container. (S1)
- This is similar to the way that bind mounts work, except that volumes are managed by Docker and are isolated from the core functionality of the host machine. (S1)
When to use them
- Volumes are the preferred mechanism for persisting data generated by and used by Docker containers. (S1)
- Volumes are easier to back up or migrate than bind mounts, and can be more safely shared among multiple containers. (S1)
- Volumes are not a good choice if you need to access the files from the host, as the volume is completely managed by Docker. (S1)
- A volume doesn't increase the size of the containers using it. (S1)
Claims
- id: C1 claim: Volumes are managed by the Docker daemon and outlive their containers. source: S2 evidence: "Volumes are persistent storage mechanisms managed by the Docker daemon."
- id: C2 claim: Container-layer data does not persist when the container is destroyed. source: S2 evidence: "Data written to the container layer doesn't persist when the container is destroyed."
- id: C3 claim: Volumes are the preferred way to persist container data. source: S1 evidence: "Volumes are the preferred mechanism for persisting data generated by and used by Docker containers."
- id: C4 claim: Volumes are easier to back up than bind mounts. source: S1 evidence: "Volumes are easier to back up or migrate than bind mounts."
Sources
- [S1] Volumes. Docker Docs. https://docs.docker.com/engine/storage/volumes/ . License: Docker docs, Apache-2.0 (github.com/docker/docs; https://github.com/docker/docs/blob/main/LICENSE); Docker name and logo are trademarks of Docker Inc and are not licensed. Accessed 2026-11-04.
- [S2] Storage. Docker Docs. https://docs.docker.com/engine/storage/ . License: Docker docs, Apache-2.0 (github.com/docker/docs; https://github.com/docker/docs/blob/main/LICENSE); Docker name and logo are trademarks of Docker Inc and are not licensed. Accessed 2026-11-04.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker Docs, Volumes, Docker docs, Apache-2.0 (github.com/docker/docs; https://github.com/docker/docs/blob/main/LICENSE); Docker name and logo are trademarks of Docker Inc and are not licensed; Docker Docs, Storage, Docker docs, Apache-2.0 (github.com/docker/docs; https://github.com/docker/docs/blob/main/LICENSE); Docker name and logo are trademarks of Docker Inc and are not licensed.
Cite this
iinventedlight. 2026. "Docker volumes: persistent data managed by Docker." iinventedlight Library, iil:note:bjapw0a3, version of 2026-11-04. https://iinventedlight.com/library/notes/docker-volumes/. License: CC-BY-4.0.
@misc{iil_note_bjapw0a3,
author = {{iinventedlight}},
title = {{Docker volumes: persistent data managed by Docker}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-04},
url = {https://iinventedlight.com/library/notes/docker-volumes/},
note = {Permanent ID iil:note:bjapw0a3. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/docker-volumes.md.