From 52d386b7289fa02555524725653825cf3dc252e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 24 Apr 2024 17:40:41 +0200 Subject: [PATCH] fix: update variables --- port_forwarding.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/port_forwarding.go b/port_forwarding.go index a11bc4fa90..14cead708f 100644 --- a/port_forwarding.go +++ b/port_forwarding.go @@ -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 @@ -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