Skip to content

Commit

Permalink
Merge pull request #436 from EndPositive/extra_hosts
Browse files Browse the repository at this point in the history
Add extra hosts to the container request
  • Loading branch information
mdelapenya authored May 5, 2022
2 parents cd84bb3 + 1193b9e commit 1f42bf6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions container.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ type ContainerRequest struct {
WaitingFor wait.Strategy
Name string // for specifying container name
Hostname string
ExtraHosts []string
Privileged bool // for starting privileged container
Networks []string // for specifying network names
NetworkAliases map[string][]string // for specifying network aliases
Expand Down
1 change: 1 addition & 0 deletions docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,7 @@ func (p *DockerProvider) CreateContainer(ctx context.Context, req ContainerReque
mounts := mapToDockerMounts(req.Mounts)

hostConfig := &container.HostConfig{
ExtraHosts: req.ExtraHosts,
PortBindings: exposedPortMap,
Mounts: mounts,
Tmpfs: req.Tmpfs,
Expand Down

0 comments on commit 1f42bf6

Please sign in to comment.