mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fixing the volume options doc
Fixes #15896 Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
This commit is contained in:
parent
900c8f5847
commit
41a36529a7
4 changed files with 21 additions and 9 deletions
|
@ -70,7 +70,12 @@ Creates a new container.
|
|||
-u, --user="" Username or UID
|
||||
--ulimit=[] Ulimit options
|
||||
--uts="" UTS namespace to use
|
||||
-v, --volume=[] Bind mount a volume
|
||||
-v, --volume=[] Bind mount a volume with: [host-src:]container-dest[:<options>], where
|
||||
options are comma delimited and selected from [rw|ro] and [z|Z].
|
||||
The 'host-src' can either be an absolute path or a name value.
|
||||
If 'host-src' 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 volumes from the specified container(s)
|
||||
-w, --workdir="" Working directory inside the container
|
||||
|
||||
|
|
|
@ -76,7 +76,12 @@ parent = "smn_cli"
|
|||
-u, --user="" Username or UID (format: <name|uid>[:<group|gid>])
|
||||
--ulimit=[] Ulimit options
|
||||
--uts="" UTS namespace to use
|
||||
-v, --volume=[] Bind mount a volume
|
||||
-v, --volume=[] Bind mount a volume with: [host-src:]container-dest[:<options>], where
|
||||
options are comma delimited and selected from [rw|ro] and [z|Z].
|
||||
The 'host-src' can either be an absolute path or a name value.
|
||||
If 'host-src' 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 volumes from the specified container(s)
|
||||
-w, --workdir="" Working directory inside the container
|
||||
|
||||
|
|
|
@ -1300,9 +1300,9 @@ Similarly the operator can set the **hostname** with `-h`.
|
|||
|
||||
### VOLUME (shared filesystems)
|
||||
|
||||
-v=[]: Create a bind mount with: [host-dir:]container-dir[:<options>], where
|
||||
-v=[]: Create a bind mount with: [host-src:]container-dest[:<options>], 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 'host-src' 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)
|
||||
|
@ -1317,8 +1317,8 @@ one or more `VOLUME`'s associated with an image, but only the operator
|
|||
can give access from one container to another (or from a container to a
|
||||
volume mounted on the host).
|
||||
|
||||
The `container-dir` must always be an absolute path such as `/src/docs`.
|
||||
The `host-dir` can either be an absolute path or a `name` value. If you
|
||||
The `container-dest` must always be an absolute path such as `/src/docs`.
|
||||
The `host-src` can either be an absolute path or a `name` value. If you
|
||||
supply an absolute path for the `host-dir`, Docker bind-mounts to the path
|
||||
you specify. If you supply a `name`, Docker creates a named volume by that `name`.
|
||||
|
||||
|
@ -1326,7 +1326,7 @@ A `name` value must start with start with an alphanumeric character,
|
|||
followed by `a-z0-9`, `_` (underscore), `.` (period) or `-` (hyphen).
|
||||
An absolute path starts with a `/` (forward slash).
|
||||
|
||||
For example, you can specify either `/foo` or `foo` for a `host-dir` value.
|
||||
For example, you can specify either `/foo` or `foo` for a `host-src` value.
|
||||
If you supply the `/foo` value, Docker creates a bind-mount. If you supply
|
||||
the `foo` specification, Docker creates a named volume.
|
||||
|
||||
|
|
|
@ -215,8 +215,10 @@ then mounting the volumes from the `dbstore` container hides the
|
|||
`/dbdata` files from the `postgres` image. The result is only the files
|
||||
from the `dbstore` container are visible.
|
||||
|
||||
You can use multiple `--volumes-from` parameters to bring together multiple data
|
||||
volumes from multiple containers.
|
||||
You can use multiple `--volumes-from` parameters to combine data volumes from
|
||||
several containers. To find detailed information about `--volumes-from` see the
|
||||
[Mount volumes from container](../reference/commandline/run.md#mount-volumes-from-container-volumes-from)
|
||||
in the `run` command reference.
|
||||
|
||||
You can also extend the chain by mounting the volume that came from the
|
||||
`dbstore` container in yet another container via the `db1` or `db2` containers.
|
||||
|
|
Loading…
Reference in a new issue