ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=<resolving>, imagePullPolicy=DefaultPullPolicy())

See original GitHub issue

Hello 😃 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:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
the-bugcommented, Nov 16, 2020

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!

0reactions
bsideupcommented, Nov 16, 2020

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 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't Get Docker Image - Stack Overflow
I have 5 spring batch tests I am running on a Jenkins pipeline using testcontainers. ... ContainerFetchException: Can't get Docker image: ...
Read more >
Confusing error "Can't get Docker image: XXX" with message ...
Confusing error "Can't get Docker image: XXX" with message "invalid reference ... imagePullPolicy=DefaultPullPolicy()) Caused by: java.lang.
Read more >
Failure of testcontainers-java on recent Docker runtime - Apache
TestCouchDBStore Can't get Docker image: RemoteDockerImage(imageName=couchdb:1.6.1, imagePullPolicy=DefaultPullPolicy()) Caused by: ...
Read more >
Micronaut Framework/questions - micronautfw/questions - Gitter
ContainerFetchException : Can't get Docker image: RemoteDockerImage(imageName=mysql:5.7.31, imagePullPolicy=DefaultPullPolicy())
Read more >
Custom configuration - Testcontainers for Java
Some companies disallow the usage of Docker Hub, but you can override *.image properties with your own images from your private registry to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found