docker volume create: add a volume for containers to share
Answer: The command creates a new volume that containers can consume and store data in.
Names and sharing
When you omit a name, Docker generates a random name.
Multiple containers can use the same volume.
Two containers can share data this way, with one writing and the other reading.
A volume name must be unique among drivers.
You cannot reuse one name with two different drivers.
Drivers and options
The default driver name is local.
On Windows, the built-in local driver accepts no options.
You can provide multiple options by passing the --opt flag multiple times.
Relative paths are not supported for mount points inside the container.
See also
Claims
- id: C1 claim: The command creates a volume that containers can store data in. source: S1 evidence: "volume that containers can consume and store data in"
- id: C2 claim: Docker invents a random name when you omit one. source: S1 evidence: "Docker generates a random name"
- id: C3 claim: More than one container can use the same volume. source: S2 evidence: "Multiple containers can use the same volume."
- id: C4 claim: Volume names must be unique among drivers. source: S2 evidence: "Volume names must be unique among drivers."
Sources
- [S1] docker volume create. Docker Docs. https://docs.docker.com/reference/cli/docker/volume/create/ . License: Apache-2.0. Accessed 2026-11-23.
- [S2] docker volume create CLI reference. Docker CLI. https://raw.githubusercontent.com/docker/cli/master/docs/reference/commandline/volume_create.md . License: Apache-2.0. Accessed 2026-11-23.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker Docs, docker volume create; Docker CLI, docker volume create CLI reference. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Apache-2.0 (https://raw.githubusercontent.com/docker/cli/master/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker Docs, docker volume create; Docker CLI, docker volume create CLI reference. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Apache-2.0 (https://raw.githubusercontent.com/docker/cli/master/LICENSE). Copyright Docker, Inc.
Cite this
iinventedlight. 2026. "docker volume create: add a volume for containers to share." iinventedlight Library, iil:note:gnmst595, version of 2026-11-23. https://iinventedlight.com/library/notes/docker-volume-create/. License: CC-BY-4.0.
@misc{iil_note_gnmst595,
author = {{iinventedlight}},
title = {{docker volume create: add a volume for containers to share}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-23},
url = {https://iinventedlight.com/library/notes/docker-volume-create/},
note = {Permanent ID iil:note:gnmst595. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- docker-volume-create.schema.json (schema; CC-BY-4.0)
- docker-volume-create.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-volume-create.md.