diff --git a/engine/swarm/services.md b/engine/swarm/services.md index 5d94168e07..fc8b98fe32 100644 --- a/engine/swarm/services.md +++ b/engine/swarm/services.md @@ -553,6 +553,20 @@ $ docker service create \ --name myservice \ ``` + +> **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=,dst=,volume-driver=local,volume-opt=type=nfs,volume-opt=device=:,"volume-opt=o=addr=,vers=4,soft,timeo=180,bg,tcp,rw"' +> --name myservice \ +> + * 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