Document relative vs absolute volume paths
This commit is contained in:
parent
5d358c7eba
commit
fa7e83dcdd
|
@ -162,12 +162,19 @@ The `docker` driver supports the following configuration in the job spec:
|
|||
```
|
||||
|
||||
* `volumes` - (Optional) A list of `host_path:container_path` strings to bind
|
||||
host paths to container paths. Can be disabled on clients by setting the
|
||||
`docker.volumes.enabled` option set to false.
|
||||
host paths to container paths. Mounting host paths outside of the alloc
|
||||
directory tasks normally have access to can be disabled on clients by setting
|
||||
the `docker.volumes.enabled` option set to false.
|
||||
|
||||
```hcl
|
||||
config {
|
||||
volumes = ["/path/on/host:/path/in/container"]
|
||||
volumes = [
|
||||
# Use absolute paths to mount arbitrary paths on the host
|
||||
"/path/on/host:/path/in/container",
|
||||
|
||||
# Use relative paths to rebind paths already in the allocation dir
|
||||
"relative/to/alloc:/also/in/container"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -364,7 +371,8 @@ options](/docs/agent/config.html#options):
|
|||
prevent Nomad from removing images from stopped tasks.
|
||||
|
||||
* `docker.volumes.enabled`: Defaults to `true`. Allows tasks to bind host paths
|
||||
(`volumes`) inside their container.
|
||||
(`volumes`) inside their container. Binding relative paths is always allowed
|
||||
and will be resolved relative to the allocation's directory.
|
||||
|
||||
* `docker.volumes.selinuxlabel`: Allows the operator to set a SELinux
|
||||
label to the allocation and task local bind-mounts to containers. If used
|
||||
|
|
|
@ -76,12 +76,19 @@ The `rkt` driver supports the following configuration in the job spec:
|
|||
* `debug` - (Optional) Enable rkt command debug option.
|
||||
|
||||
* `volumes` - (Optional) A list of `host_path:container_path` strings to bind
|
||||
host paths to container paths. Can be disabled on clients by setting the
|
||||
`rkt.volumes.enabled` option set to false.
|
||||
host paths to container paths. Mounting host paths outside of the alloc
|
||||
directory tasks normally have access to can be disabled on clients by setting
|
||||
the `rkt.volumes.enabled` option set to false.
|
||||
|
||||
```hcl
|
||||
config {
|
||||
volumes = ["/path/on/host:/path/in/container"]
|
||||
volumes = [
|
||||
# Use absolute paths to mount arbitrary paths on the host
|
||||
"/path/on/host:/path/in/container",
|
||||
|
||||
# Use relative paths to rebind paths already in the allocation dir
|
||||
"relative/to/alloc:/also/in/container"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -98,7 +105,9 @@ The `rkt` driver has the following [client configuration
|
|||
options](/docs/agent/config.html#options):
|
||||
|
||||
* `rkt.volumes.enabled`: Defaults to `true`. Allows tasks to bind host paths
|
||||
(`volumes`) inside their container.
|
||||
(`volumes`) inside their container. Binding relative paths is always allowed
|
||||
and will be resolved relative to the allocation's directory.
|
||||
|
||||
|
||||
## Client Attributes
|
||||
|
||||
|
|
Loading…
Reference in New Issue