We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug WaitingFor returns "port not found" if NetworkMode == host
To Reproduce
func TestContainerWithHostNetworkOptionsAndWaitStrategy(t *testing.T) { ctx := context.Background() gcr := GenericContainerRequest{ContainerRequest: ContainerRequest{ Image: "nginx", SkipReaper: true, NetworkMode: "host", WaitingFor: wait.ForListeningPort("80/tcp"), }, Started: true, } nginxC, err := GenericContainer(ctx, gcr) if err != nil { t.Fatal(err) } defer nginxC.Terminate(ctx) host, err := nginxC.Host(ctx) if err != nil { t.Errorf("Expected host %s. Got '%d'.", host, err) } _, err = http.Get("http://" + host + ":80") if err != nil { t.Errorf("Expected OK response. Got '%d'.", err) } }
Expected behavior Port found
docker info
Client: Debug Mode: false Server: Containers: 2 Running: 2 Paused: 0 Stopped: 18 Images: 35 Server Version: 19.03.3 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: b34a5c8af56e510852c35414db4c1f4fa6172339 runc version: 3e425f80a8c931f88e6d94a8c831b9d5aa481657 init version: fec3683 Security Options: apparmor seccomp Profile: default Kernel Version: 5.3.0-29-generic Operating System: Ubuntu 19.10 OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 15.34GiB Name: ID: Docker Root Dir: /var/lib/docker Debug Mode: false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false
Additional context In my mind problem in docker.go
func (c *DockerContainer) MappedPort(ctx context.Context, port nat.Port) (nat.Port, error)
The text was updated successfully, but these errors were encountered:
#151
Sorry, something went wrong.
Merge pull request #151 from Bablzz/master
f64b20d
#150 If networkMode host ForListeningPort does not work
Fixed
No branches or pull requests
Describe the bug
WaitingFor returns "port not found" if NetworkMode == host
To Reproduce
Expected behavior
Port found
docker info
Additional context
In my mind problem in docker.go
The text was updated successfully, but these errors were encountered: