Changes the relative path from joining against the alloc dir to the

task's directory.

This PR changes the behavior when given a relative host path when
mounting docker containers. Prior to this, the behavior was to mount by
joining against the alloc/ directory. This PR changes it to be against
the task/ directory.
This commit is contained in:
Alex Dadgar
2016-11-10 14:47:54 -08:00
parent 96cbf337c1
commit e246167dc5
3 changed files with 13 additions and 6 deletions

View File

@@ -166,9 +166,10 @@ 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. 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.
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.
```hcl
config {
@@ -177,7 +178,7 @@ The `docker` driver supports the following configuration in the job spec:
"/path/on/host:/path/in/container",
# Use relative paths to rebind paths already in the allocation dir
"relative/to/alloc:/also/in/container"
"relative/to/task:/also/in/container"
]
}
```