Hello.
I’m trying to use https://github.com/fsouza/go-dockerclient to reproduce a command I enter in the command line.
Original Command
$ docker run -v "$GOPATH":/go golang:1.5 find /go
Docker Remote API
docker.CreateContainerOptions{
Name: "my container",
Config: &docker.Config{
Mounts: []docker.Mount{
{Source: os.ExpandEnv("$GOPATH"),
Destination: "/go",
RW: true},
},
Image: "golang:1.5",
Cmd: []string{"find", "/go"},
},
}
In the API code, I first create a container. Then, in a separate function call, I start it. The container runs, but find
doesn’t find any files. Just an empty skeleton of directories.
Is it possible to do -v /foo:/foo
with the Remote API?