-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Question: testcontainers inside k8s Jenkins container. #654
Comments
Hi @sjvatgit, This line says that your Docker environment is not configured to use local Nexus:
I would suggest configuring |
Thank you for the reply! Currently I've stuck with this: 172.17.0.1 is the docker host node address inside k8s. |
Yes, I have 1.7.1 already. I'ts the latest one and if I understand the fix correctly the previous version retruns with localhost:port. But I suppose current 172.17.0.1:port is the correct one. |
Thank you! |
Hello! I'm trying to setup the testing environment inside Jenkins k8s container.
I think it's important to mention that k8s cluster has no internet access but local private docker + maven registries inside nexus.
The jenkins test job have the following output now:
T E S T S
Running SimplePostgreSQLTest
[main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Loaded org.testcontainers.dockerclient.EnvironmentAndSystemPropertyClientProviderStrategy from ~/.testcontainers.properties, will try it first
[main] INFO org.testcontainers.dockerclient.EnvironmentAndSystemPropertyClientProviderStrategy - Found docker client settings from environment
[main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Found Docker environment with Environment variables, system properties and defaults. Resolved:
dockerHost=unix:///var/run/docker.sock
apiVersion='{UNKNOWN_VERSION}'
registryUrl='https://index.docker.io/v1/'
registryUsername='root'
registryPassword='null'
registryEmail='null'
dockerConfig='DefaultDockerClientConfig[dockerHost=unix:///var/run/docker.sock,registryUsername=root,registryPassword=,registryEmail=,registryUrl=https://index.docker.io/v1/,dockerConfigPath=/root/.docker,sslConfig=,apiVersion={UNKNOWN_VERSION},dockerConfig=]'
[testcontainers-netty-1-3] ERROR com.github.dockerjava.core.async.ResultCallbackTemplate - Error during callback
com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.144.143.34:53: no such host"}
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.884 sec <<< FAILURE!
testSimple(SimplePostgreSQLTest) Time elapsed: 0.027 sec <<< ERROR!
com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.144.143.34:53: no such host"}
I really don't understand why it tries to reach registry-1.docker.io instead of local nexus where all images/jars are stored.
The text was updated successfully, but these errors were encountered: