Skip to content

Commit a168b51

Browse files
authored
Merge pull request #100 from noxiouz/docker_path_fix
isolate(docker): fix --endpoint in case of a non-standart path
2 parents 4914c8a + c0f97dd commit a168b51

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

isolate/docker/container.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,17 @@ func newContainer(ctx context.Context, client *client.Client, profile *Profile,
6161
Env = append(Env, k+"="+v)
6262
}
6363

64+
var binds = make([]string, 1)
65+
binds[0] = filepath.Dir(args["--endpoint"]) + ":" + profile.RuntimePath
66+
// update args["--endpoint"] according to the container's point of view
67+
args["--endpoint"] = filepath.Join(profile.RuntimePath, filepath.Base(args["--endpoint"]))
68+
6469
var Cmd = make(strslice.StrSlice, 1, len(args)+1)
6570
Cmd[0] = executable
6671
for k, v := range args {
6772
Cmd = append(Cmd, k, v)
6873
}
6974

70-
var binds = make([]string, 1)
71-
binds[0] = filepath.Dir(args["--endpoint"]) + ":" + profile.RuntimePath
72-
7375
config := container.Config{
7476
AttachStdin: false,
7577
AttachStdout: true,

0 commit comments

Comments
 (0)