Skip to content
New issue

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

1.12.5 seems to have broken docker host ip detection when running inside a container #2453

Closed
cerst opened this issue Mar 18, 2020 · 1 comment

Comments

@cerst
Copy link

cerst commented Mar 18, 2020

Hi,

we noticed that the docker host ip detection seems to be broken (at least in our case) starting with 1.12.5 (1.13.0 is affected as well) as it uses localhost instead of the docker gateway ip. Thus, connection attempts to Ryuk or any other container fail.

Setup
We run testcontainers from within a Jenkins docker container. Docker sock is mounted properly but the code is cloned inside the container instead being mounted (i.e. no $pwd mounts are in place).

Logs
Here's the log until including 1.12.4

o.t.d.DockerClientProviderStrategy DEBUG Pinging docker daemon...
o.t.d.EnvironmentAndSystemPropertyClientProviderStrategy INFO  Found docker client settings from environment 
o.t.d.DockerClientProviderStrategy INFO  Found Docker environment with Environment variables, system properties and defaults. Resolved dockerHost=unix:///var/run/docker.sock 
o.t.d.DockerClientProviderStrategy DEBUG Checking Docker OS type for Environment variables, system properties and defaults. Resolved dockerHost=unix:///var/run/docker.sock  
o.t.DockerClientFactory        INFO  Docker host IP address is 172.17.0.1 
o.t.DockerClientFactory        INFO  Connected to docker: 

This changes starting with 1.12.5

o.t.d.DockerClientProviderStrategy DEBUG Pinging docker daemon... 
o.t.d.EnvironmentAndSystemPropertyClientProviderStrategy INFO Found docker client settings from environment
o.t.d.DockerClientProviderStrategy INFO Found Docker environment with Environment variables, system properties and defaults. Resolved dockerHost=unix:///var/run/docker.sock
o.t.d.DockerClientProviderStrategy DEBUG Checking Docker OS type for Environment variables, system properties and defaults. Resolved dockerHost=unix:///var/run/docker.sock 
o.t.DockerClientFactory  INFO Docker host IP address is localhost 
o.t.DockerClientFactory  INFO Connected to docker: 
@bsideup
Copy link
Member

bsideup commented Mar 18, 2020

Duplicate of #2239. See #2429 for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants