Merge pull request #1830 from hashicorp/b-docker-local-dir

Mount the local directory into the Docker container
This commit is contained in:
Alex Dadgar
2016-10-18 16:00:13 -07:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ BUG FIXES:
leader [GH-1656]
* discovery: Fix client flapping when server is in a different datacenter as
the client [GH-1641]
* driver/docker: Fix `local/` directory mount into container [GH-1830]
## 0.4.1 (August 18, 2016)

View File

@@ -381,10 +381,12 @@ func (d *DockerDriver) containerBinds(driverConfig *DockerDriverConfig, alloc *a
task *structs.Task) ([]string, error) {
shared := alloc.SharedDir
local, ok := alloc.TaskDirs[task.Name]
taskDir, ok := alloc.TaskDirs[task.Name]
if !ok {
return nil, fmt.Errorf("Failed to find task local directory: %v", task.Name)
}
local := filepath.Join(taskDir, allocdir.TaskLocal)
secret, err := alloc.GetSecretDir(task.Name)
if err != nil {
return nil, err