Skip to content

Commit

Permalink
fix: update variables
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Apr 24, 2024
1 parent 11576b5 commit 52d386b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions port_forwarding.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func exposeHostPorts(ctx context.Context, req *ContainerRequest, p ...int) (Cont
}
}

opts = append(opts, withNetwork([]string{hostInternal}, &dockerNw))
opts = append(opts, withNetwork([]string{HostInternal}, &dockerNw))
}

// start the SSHD container with the provided options
Expand All @@ -103,7 +103,7 @@ func exposeHostPorts(ctx context.Context, req *ContainerRequest, p ...int) (Cont
req.HostConfigModifier = func(hostConfig *container.HostConfig) {
// adding the host internal alias to the container as an extra host
// to allow the container to reach the SSHD container.
hostConfig.ExtraHosts = append(hostConfig.ExtraHosts, fmt.Sprintf("%s:%s", hostInternal, sshdIP))
hostConfig.ExtraHosts = append(hostConfig.ExtraHosts, fmt.Sprintf("%s:%s", HostInternal, sshdIP))

modes := []container.NetworkMode{container.NetworkMode(sshdFirstNetwork), "none", "host"}
// if the container is not in one of the modes, attach it to the first network of the SSHD container
Expand Down

0 comments on commit 52d386b

Please sign in to comment.