Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Adding docker socket when necessary (fixes #13)
Browse files Browse the repository at this point in the history
  • Loading branch information
vania-pooh committed Jun 5, 2017
1 parent 1fb9474 commit 82e1202
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 82e1202

Please sign in to comment.