Skip to content

Commit

Permalink
Merge pull request #1830 from hashicorp/b-docker-local-dir
Browse files Browse the repository at this point in the history
Mount the local directory into the Docker container
  • Loading branch information
dadgar committed Oct 18, 2016
2 parents a6b0747 + 42358a9 commit 06bf6c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 3 additions & 1 deletion client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 06bf6c4

Please sign in to comment.