Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions man/src/volume/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ configure the container to use it, for example:
hello
$ docker run -d -v hello:/world busybox ls /world

The mount is created inside the container's `/src` directory. Docker does
The mount is created inside the container's `/world` directory. Docker does

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(OK for a follow-up) we could probably sync most of this section with the reference docs;

Create a volume and then configure the container to use it:
```console
$ docker volume create hello
hello
$ docker run -d -v hello:/world busybox ls /world
```
The mount is created inside the container's `/world` directory. Docker doesn't
support relative paths for mount points inside the container.
Multiple containers can use the same volume. This is useful if two containers
need access to shared data. For example, if one container writes and the other
reads the data.
Volume names must be unique among drivers. This means you can't use the same
volume name with two different drivers. Attempting to create two volumes with
the same name results in an error:
```console
A volume named "hello" already exists with the "some-other" driver. Choose a different volume name.
```
If you specify a volume name already in use on the current driver, Docker
assumes you want to reuse the existing volume and doesn't return an error.

not support relative paths for mount points inside the container.

Multiple containers can use the same volume in the same time period. This is
useful if two containers need access to shared data. For example, if one
container writes and the other reads the data.
Multiple containers can use the same volume. This is useful if two containers
need access to shared data. For example, if one container writes and the other
reads the data.

Volume names must be unique among drivers. Attempting to create two volumes
with the same name on different drivers results in an error. If you specify a
volume name already in use on the current driver, Docker reuses the existing
volume and does not return an error.

## Driver specific options

Expand Down
Loading