Merge pull request #5573 from hashicorp/dani/update-vol-docs

docs: Clarify docker volume behaviour
This commit is contained in:
Danielle 2019-04-18 14:30:16 +02:00 committed by GitHub
commit be7daaaf15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 {