mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
Merge pull request #1830 from hashicorp/b-docker-local-dir
Mount the local directory into the Docker container
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user