Skip to content

Commit

Permalink
Merge pull request #5573 from hashicorp/dani/update-vol-docs
Browse files Browse the repository at this point in the history
docs: Clarify docker volume behaviour
  • Loading branch information
endocrimes committed Apr 18, 2019
2 parents 15c6487 + acf8ab8 commit 4789948
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions website/source/docs/drivers/docker.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 4789948

Please sign in to comment.