Skip to content

Commit

Permalink
document bind and tmpfs options
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmood Ali committed Nov 27, 2018
1 parent fb5ffe6 commit cb453e7
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion website/source/docs/drivers/docker.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,14 @@ The `docker` driver supports the following configuration in the job spec. Only

* `mounts` - (Optional) A list of
[mounts](https://docs.docker.com/engine/reference/commandline/service_create/#add-bind-mounts-or-volumes)
to be mounted into the container. Only volume type mounts are supported.
to be mounted into the container. Volume, bind, and tmpfs type mounts are supported.

```hcl
config {
mounts = [
# sample volume mount
{
type = "volume"
target = "/path/in/container"
source = "name-of-volume"
readonly = false
Expand All @@ -314,6 +316,25 @@ The `docker` driver supports the following configuration in the job spec. Only
}
}
}
},
# sample bind mount
{
type = "bind"
target = "/path/in/container"
source = "/path/in/host"
readonly = false
bind_options {
propagation = "xxxx"
}
},
# sample tmpfs mount
{
type = "tmpfs"
target = "/path/in/container"
readonly = false
tmpfs_options {
size = 100000 # size in bytes
}
}
]
}
Expand Down

0 comments on commit cb453e7

Please sign in to comment.