ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=<resolving>, imagePullPolicy=DefaultPullPolicy())
See original GitHub issueHello 😃 we are using testcontainers in our build process for integration testing. The build is executed on a jenkins server with maven.
If the jenkins server is under heavy load (high CPU and RAM utilization) than some strange error is happening:
org.testcontainers.containers.ContainerLaunchException: Container startup failed
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=<resolving>, imagePullPolicy=DefaultPullPolicy())
Caused by: com.github.dockerjava.api.exception.DockerClientException: Could not build image: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
The corresponding docker image is build via the DockerfileBuilder from a base image that is in the local repository. The base image was build before with io.fabric8.docker-maven-plugin.
The jenkins server is behind a firewall which drops the packages. This may be the answer for the Client.Timeout.
For me it is strange that imageName=<resolving>. I would expect here some name…
I am using version 1.15.0 of org.testcontainers.testcontainers
What information can I further provide?
Thanks for any help in advance!
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Related StackOverflow Question
The pull policy is a good point.
I will try to set up a reproducer on the weekend. But this may be not deterministic…
Thx again!
if you only need to use a local image, you can set the image pull policy to never pull. Perhaps that’s why it was trying to connect to Docker Hub
Otherwise, a reproducer would be highly appreciated because it becomes a bit hard to understand the behaviour described and what the issue is about 😃