From b5a037443db0dd9ec5ca6d1d91aa83bf1515a89d Mon Sep 17 00:00:00 2001 From: Mike Brown Date: Mon, 14 Sep 2015 14:42:31 -0500 Subject: [PATCH] man update for docker run with host volumes Signed-off-by: Mike Brown cleaning up docker run -v documentation for man and web reference guide Signed-off-by: Mike Brown --- docs/reference/run.md | 8 ++++++-- man/docker-run.1.md | 16 +++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/reference/run.md b/docs/reference/run.md index 73706908fd..287d91d44d 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -1309,12 +1309,16 @@ container's `/etc/hosts` entry will be automatically updated. ### VOLUME (shared filesystems) - -v=[]: Create a bind mount with: [host-dir:]container-dir[:rw|ro]. - If 'host-dir' is missing, then docker creates a new volume. + -v=[]: Create a bind mount with: [host-dir:]container-dir[:], where + options are comma delimited and selected from [rw|ro] and [z|Z]. + If 'host-dir' is missing, then docker creates a new volume. If neither 'rw' or 'ro' is specified then the volume is mounted in read-write mode. --volumes-from="": Mount all volumes from the given container(s) +> **Note**: +> The auto-creation of the host path has been [*deprecated*](/misc/deprecated/#auto-creating-missing-host-paths-for-bind-mounts). + The volumes commands are complex enough to have their own documentation in section [*Managing data in containers*](/userguide/dockervolumes). A developer can define diff --git a/man/docker-run.1.md b/man/docker-run.1.md index 960ac9f27d..bb7c38e01a 100644 --- a/man/docker-run.1.md +++ b/man/docker-run.1.md @@ -430,9 +430,17 @@ standard input. ""--ulimit""=[] Ulimit options -**-v**, **--volume**=[] - Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container) - +**-v**, **--volume**=[] Create a bind mount + (format: `[host-dir:]container-dir[:]`, where suffix options +are comma delimited and selected from [rw|ro] and [z|Z].) + + (e.g., using -v /host-dir:/container-dir, bind mounts /host-dir in the +host to /container-dir in the Docker container) + + If 'host-dir' is missing, then docker automatically creates the new volume +on the host. **This auto-creation of the host path has been deprecated in +Release: v1.9.** + The **-v** option can be used one or more times to add one or more mounts to a container. These mounts can then be used in other containers using the **--volumes-from** option. @@ -467,8 +475,6 @@ For example, you can specify either `/foo` or `foo` for a `host-dir` value. If you supply the `/foo` value, Docker creates a bind-mount. If you supply the `foo` specification, Docker creates a named volume. -**Note:** Multiple Volume options can be added separated by a , (comma). - **--volumes-from**=[] Mount volumes from the specified container(s)