Skip to content

man: fix volume create mount path and name reuse notes - #7338

Open
TastyHeadphones wants to merge 1 commit into
docker:masterfrom
TastyHeadphones:fix/volume-create-man-world-path
Open

TastyHeadphones wants to merge 1 commit into
docker:masterfrom
TastyHeadphones:fix/volume-create-man-world-path

Conversation

@TastyHeadphones

Copy link
Copy Markdown

The docker volume create man page example mounts at /world, but the next sentence said /src.

Also added the same-driver reuse / cross-driver name clash notes so the man page matches the reference docs.

The example mounts at /world but the prose said /src. Also document
same-driver reuse vs cross-driver name clash, matching the reference docs.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread man/src/volume/create.md
$ 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.

@thaJeztah

Copy link
Copy Markdown
Member

Thank you for contributing! It looks like your commit message is missing a DCO sign-off,
causing the DCO check to fail.

We require all commit messages to have a Signed-off-by line with your name
and e-mail (see "Sign your work"
in the CONTRIBUTING.md in this repository), which looks something like:

Signed-off-by: YourFirstName YourLastName <yourname@example.org>

There is no need to open a new pull request, but to fix this (and make CI pass),
you need to amend the commit(s) in this pull request, and "force push" the amended
commit.

Unfortunately, it's not possible to do so through GitHub's web UI, so this needs
to be done through the git commandline.

You can find some instructions in the output of the DCO check (which can be found
in the "checks" tab on this pull request), as well as in the Moby contributing guide.

Steps to do so "roughly" come down to:

  1. Set your name and e-mail in git's configuration:

    git config --global user.name "YourFirstName YourLastName"
    git config --global user.email "yourname@example.org"

    (Make sure to use your real name (not your GitHub username/handle) and e-mail)

  2. Clone your fork locally

  3. Check out the branch associated with this pull request

  4. Sign-off and amend the existing commit(s)

    git commit --amend --no-edit --signoff

    If your pull request contains multiple commits, either squash the commits (if
    needed) or sign-off each individual commit.

  5. Force push your branch to GitHub (using the --force or --force-with-lease flags) to update the pull request.

Let me know if you need help or more detailed instructions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants