Skip to content

Commit

Permalink
Merge pull request #14 from vania-pooh/master
Browse files Browse the repository at this point in the history
Adding docker socket when necessary (fixes #13)
  • Loading branch information
aandryashin committed Jun 5, 2017
2 parents 1fb9474 + 82e1202 commit 28aeb37
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions selenoid/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@ func (c *DockerConfigurator) Start() error {
portBindings := nat.PortMap{}
portBindings[port] = []nat.PortBinding{{HostIP: "0.0.0.0", HostPort: portString}}
volumes := []string{fmt.Sprintf("%s:/etc/selenoid:ro", c.ConfigDir)}
const dockerSocket = "/var/run/docker.sock"
if fileExists(dockerSocket) {
volumes = append(volumes, fmt.Sprintf("%s:%s", dockerSocket, dockerSocket))
}
ctx := context.Background()
ctr, err := c.docker.ContainerCreate(ctx,
&container.Config{
Expand Down

0 comments on commit 28aeb37

Please sign in to comment.