docs: Clairfy docker volume behaviour

This commit is contained in:
Danielle Lancashire
2019-04-17 11:31:55 +02:00
parent c07b72959d
commit acf8ab8665

View File

@@ -259,7 +259,8 @@ The `docker` driver supports the following configuration in the job spec. Only
host paths to container paths. Mounting host paths outside of the allocation
directory can be disabled on clients by setting the `docker.volumes.enabled`
option set to false. This will limit volumes to directories that exist inside
the allocation directory.
the allocation directory. We recommend using [`mounts`](#mounts) if you wish
to have more control over volume definitions.
```hcl
config {
@@ -274,10 +275,11 @@ The `docker` driver supports the following configuration in the job spec. Only
```
* `volume_driver` - (Optional) The name of the volume driver used to mount
volumes. Must be used along with `volumes`.
Using a `volume_driver` also allows to use `volumes` with a named volume as
well as absolute paths. If `docker.volumes.enabled` is false then volume
drivers are disallowed.
volumes. Must be used along with `volumes`. If `volume_driver` is omitted,
then relative paths will be mounted from inside the allocation dir. If a
`"local"` or other driver is used, then they may be named volumes instead.
If `docker.volumes.enabled` is false then volume drivers and paths outside the
allocation directory are disallowed.
```hcl
config {