mirror of https://github.com/docker/docs.git
move mount csv note from services to volumes (#6568)
This commit is contained in:
parent
74631424e7
commit
927844cac4
|
@ -879,18 +879,8 @@ $ docker service create \
|
||||||
<IMAGE>
|
<IMAGE>
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Important:** If your volume driver accepts a comma-separated list as an option,
|
For more information on how to create data volumes and the use of volume
|
||||||
> you must escape the value from the outer CSV parser. To escape a `volume-opt`,
|
drivers, see [Use volumes](/storage/volumes/).
|
||||||
> surround it with double quotes (`"`) and surround the entire mount parameter
|
|
||||||
> with single quotes (`'`).
|
|
||||||
>
|
|
||||||
> For example, the `local` driver accepts mount options as a comma-separated
|
|
||||||
> list in the `o` parameter. This example shows the correct way to escape the list.
|
|
||||||
>
|
|
||||||
> $ docker service create \
|
|
||||||
> --mount 'type=volume,src=<VOLUME-NAME>,dst=<CONTAINER-PATH>,volume-driver=local,volume-opt=type=nfs,volume-opt=device=<nfs-server>:<nfs-path>,"volume-opt=o=addr=<nfs-address>,vers=4,soft,timeo=180,bg,tcp,rw"'
|
|
||||||
> --name myservice \
|
|
||||||
> <IMAGE>
|
|
||||||
|
|
||||||
|
|
||||||
#### Bind mounts
|
#### Bind mounts
|
||||||
|
|
|
@ -81,6 +81,23 @@ If you need to specify volume driver options, you must use `--mount`.
|
||||||
- The `volume-opt` option, which can be specified more than once, takes a
|
- The `volume-opt` option, which can be specified more than once, takes a
|
||||||
key-value pair consisting of the option name and its value.
|
key-value pair consisting of the option name and its value.
|
||||||
|
|
||||||
|
> Escape values from outer CSV parser
|
||||||
|
>
|
||||||
|
> If your volume driver accepts a comma-separated list as an option,
|
||||||
|
> you must escape the value from the outer CSV parser. To escape a `volume-opt`,
|
||||||
|
> surround it with double quotes (`"`) and surround the entire mount parameter
|
||||||
|
> with single quotes (`'`).
|
||||||
|
>
|
||||||
|
> For example, the `local` driver accepts mount options as a comma-separated
|
||||||
|
> list in the `o` parameter. This example shows the correct way to escape the list.
|
||||||
|
>
|
||||||
|
> $ docker service create \
|
||||||
|
> --mount 'type=volume,src=<VOLUME-NAME>,dst=<CONTAINER-PATH>,volume-driver=local,volume-opt=type=nfs,volume-opt=device=<nfs-server>:<nfs-path>,"volume-opt=o=addr=<nfs-address>,vers=4,soft,timeo=180,bg,tcp,rw"'
|
||||||
|
> --name myservice \
|
||||||
|
> <IMAGE>
|
||||||
|
> {: .warning}
|
||||||
|
|
||||||
|
|
||||||
The examples below show both the `--mount` and `-v` syntax where possible, and
|
The examples below show both the `--mount` and `-v` syntax where possible, and
|
||||||
`--mount` is presented first.
|
`--mount` is presented first.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue