---
source: https://iinventedlight.com/library/notes/docker-volumes.md
title: "Docker volumes: persistent data managed by Docker"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_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; prose restates or closely paraphrases cited source lines"
license_family: docker-docs-apache
rule_check: "needs rule check (family not in auto-publish rule; check.mjs auto-approves only usgov and arxiv-ccby)"
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-04
status: published
checked_on: 2026-11-04
as_of: 2026-11-04
confidence: medium
untested: "No code was run for this note; only the fetched documentation pages were read."
category: coding-references
topic_area: "code-ai-eng: Docker"
tags: ['docker', 'volumes', 'storage']
sources:
  - id: S1
    title: "Volumes"
    publisher: Docker Docs
    url: https://docs.docker.com/engine/storage/volumes/
    accessed: 2026-11-04
    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"
  - id: S2
    title: "Storage"
    publisher: Docker Docs
    url: https://docs.docker.com/engine/storage/
    accessed: 2026-11-04
    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"
---
# 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).
