mirror of https://github.com/docker/docs.git
parent
751ef1ac3c
commit
dddd864438
|
@ -553,6 +553,20 @@ $ docker service create \
|
|||
--name myservice \
|
||||
<IMAGE>
|
||||
```
|
||||
|
||||
> **Important:** 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 correcty 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 are file system paths from the host where the scheduler deploys
|
||||
the container for the task. Docker mounts the path into the container. The
|
||||
|
|
Loading…
Reference in New Issue