testcontainers-java: "No such image: testcontainers/ryuk:0.3.0"
Testcontainers 1.15.0 on Docker Engine 20.10/Docker for Mac 2.5.4 fails with the following stacktrace:
org.testcontainers.containers.ContainerLaunchException: Container startup failed
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:327)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:308)
at org.testcontainers.spock.TestcontainersMethodInterceptor.startContainers_closure3(TestcontainersMethodInterceptor.groovy:83)
at groovy.lang.Closure.call(Closure.java:405)
at groovy.lang.Closure.call(Closure.java:421)
at org.testcontainers.spock.TestcontainersMethodInterceptor.startContainers(TestcontainersMethodInterceptor.groovy:80)
at org.testcontainers.spock.TestcontainersMethodInterceptor.interceptSetupSpecMethod(TestcontainersMethodInterceptor.groovy:25)
at org.spockframework.runtime.extension.AbstractMethodInterceptor.intercept(AbstractMethodInterceptor.java:36)
at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:97)
at org.spockframework.spring.SpringInterceptor.interceptSetupSpecMethod(SpringInterceptor.java:37)
at org.spockframework.runtime.extension.AbstractMethodInterceptor.intercept(AbstractMethodInterceptor.java:36)
at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:97)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=couchdb:1.7.2, imagePullPolicy=DefaultPullPolicy())
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1278)
at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:612)
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:317)
... 16 more
Caused by: com.github.dockerjava.api.exception.NotFoundException: Status 404: {"message":"No such image: testcontainers/ryuk:0.3.0"}
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:241)
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.post(DefaultInvocationBuilder.java:125)
at org.testcontainers.shaded.com.github.dockerjava.core.exec.CreateContainerCmdExec.execute(CreateContainerCmdExec.java:33)
at org.testcontainers.shaded.com.github.dockerjava.core.exec.CreateContainerCmdExec.execute(CreateContainerCmdExec.java:13)
at org.testcontainers.shaded.com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
at org.testcontainers.shaded.com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
at org.testcontainers.shaded.com.github.dockerjava.core.command.CreateContainerCmdImpl.exec(CreateContainerCmdImpl.java:595)
at org.testcontainers.utility.ResourceReaper.start(ResourceReaper.java:91)
at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:203)
at org.testcontainers.LazyDockerClient.getDockerClient(LazyDockerClient.java:14)
at org.testcontainers.LazyDockerClient.listImagesCmd(LazyDockerClient.java:12)
at org.testcontainers.images.LocalImagesCache.maybeInitCache(LocalImagesCache.java:68)
at org.testcontainers.images.LocalImagesCache.get(LocalImagesCache.java:32)
at org.testcontainers.images.AbstractImagePullPolicy.shouldPull(AbstractImagePullPolicy.java:18)
at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:66)
at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:27)
at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:17)
at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:39)
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1276)
... 18 more
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 28
- Comments: 61 (24 by maintainers)
Commits related to this issue
- filter images by reference. Fixes #3574 — committed to testcontainers/testcontainers-java by bsideup 4 years ago
- Upgrade testcontainers to 1.15.1 on cloud-function-aws sample To solve testcontainers/testcontainers-java#3574 See gh-440 — committed to spring-attic/spring-native by sdeleuze 3 years ago
- update testcontainers version to avoid bug with latest docker engine see: https://github.com/testcontainers/testcontainers-java/issues/3574#issuecomment-760717283 — committed to cedardevs/onestop by mcquinne 3 years ago
- fix(deps): bump testcontainers version Tests are failing due to https://github.com/testcontainers/testcontainers-java/issues/3574 Bumping testcontainers version should resolve. — committed to lorin/keel by lorin 3 years ago
- fix: Upgrade testcontainers dependency to 0.15.1 We seem to be experiencing flaky builds on datahub (CI/CD fails on PRs: e.g. https://github.com/linkedin/datahub/pull/2084/checks) specifically: Exe... — committed to linkedin/datahub-gma by shirshanka 3 years ago
- bump testcontainers to 1.15.1 See testcontainers/testcontainers-java#3574 — committed to git-as-svn/git-as-svn by slonopotamus 3 years ago
- fix: Upgrade testcontainers dependency to 0.15.1 (#75) We seem to be experiencing flaky builds on datahub (CI/CD fails on PRs: e.g. https://github.com/linkedin/datahub/pull/2084/checks) specifically... — committed to linkedin/datahub-gma by shirshanka 3 years ago
- bump Testcontainers version due to failing pipeline See https://github.com/testcontainers/testcontainers-java/issues/3574 — committed to rieckpil/blog-tutorials by rieckpil 3 years ago
- update testcontainers to 1.15.1 to fix https://github.com/testcontainers/testcontainers-java/issues/3574 — committed to notifyme-app/notifyme-sdk-backend by kistlers 3 years ago
- [ZEPPELIN-5240] Neo4jCypherInterpreterTest fails ### What is this PR for? This PR should fix the testcontainers error. More informations can be found at https://github.com/testcontainers/testcontaine... — committed to apache/zeppelin by Reamer 3 years ago
- [ZEPPELIN-5240] Neo4jCypherInterpreterTest fails ### What is this PR for? This PR should fix the testcontainers error. More informations can be found at https://github.com/testcontainers/testcontaine... — committed to apache/zeppelin by Reamer 3 years ago
- fix testcontainers (#254) **The testcontainers version 1.14.3 used failed to test because of a dependent docker image**. testcontainers issue: ["No such image: testcontainers/ryuk:0.3.0"](https://g... — committed to streamnative/pulsar-flink by deleted user 3 years ago
- fix testcontainers (#254) **The testcontainers version 1.14.3 used failed to test because of a dependent docker image**. testcontainers issue: ["No such image: testcontainers/ryuk:0.3.0"](https://git... — committed to streamnative/pulsar-flink by jianyun8023 3 years ago
- Bump TestContainers to stable release to specifically fix #3574 https://github.com/testcontainers/testcontainers-java/issues/3574 — committed to astubbs/parallel-consumer by astubbs 3 years ago
- Bump TestContainers to stable release to specifically fix #3574 https://github.com/testcontainers/testcontainers-java/issues/3574 — committed to astubbs/parallel-consumer by astubbs 3 years ago
- Bump TestContainers to stable release to specifically fix #3574 https://github.com/testcontainers/testcontainers-java/issues/3574 — committed to confluentinc/parallel-consumer by astubbs 3 years ago
- bump Testcontainers version due to failing pipeline See https://github.com/testcontainers/testcontainers-java/issues/3574 — committed to fyseferoglu/blog-tutorials by rieckpil 3 years ago
- fix state for flink 1.11 (#264) * fix state for flink 1.11 * fix testcontainers (#254) **The testcontainers version 1.14.3 used failed to test because of a dependent docker image**. testcontai... — committed to streamnative/pulsar-flink by deleted user 3 years ago
- TestContainers bug https://github.com/testcontainers/testcontainers-java/issues/3574 — committed to andrewinci/Insulator by georgexcollins 3 years ago
- Fix issue in testcontainers-java (https://github.com/testcontainers/testcontainers-java/issues/3574) — committed to uberall/micronaut-distributed-lock by maxdec 3 years ago
Ok, “filter by image name” query parameter in
/images/json
got removed, and now this condition fails: https://github.com/testcontainers/testcontainers-java/blob/d135a2605401f6c663aab4e7edc6d6d76716f930/core/src/main/java/org/testcontainers/DockerClientFactory.java#L330I just submitted #3575 with a fix, will be included in 1.15.1
released in 1.15.1 🎉
I confirm that after upgrading to test containers 1.15.1 I no longer have this issue
Thanks @bsideup for the quick fix!
@mderouet the release is expected for later today (tsss 😉)
404 and
{"message":"No such image: testcontainers/ryuk:0.3.0"}
is what we actually get from the API.Also,
testcontainers/*
images are exempt from rate limiting, or at least that’s what they told us 😃@bsideup Thank you for your response! Sorry, it was my fault. Thanks to your response I’ve dug deeper into the project and I’ve realised that we were using another Testcontainers dependency,
org.testcontainers:selenium
that was not updated. So now, both dependencies has been updated to the latest version (1.15.3) and it’s properly working 😉Thank you and I apologise for the inconvenience.
In my case, it’s passing locally on Mac with latest Docker for Mac stable (but I have those images in my cache though) and failing on GitLab.
just pull it manualy by console “docker pull testcontainers/ryuk:0.3.0”
@davoutuk with Testcontainers 1.15.1? There was a bug that got fixed in 1.15.1, there isn’t such prerequisite
It works, thanks
I suppose that the 404 is the local Docker Engine and no lookup to any registry is made. In this case I don’t use any private registry, the engine is directly connecting to the Docker Hub. Manual
testcontainers/ryuk:0.3.0
fixes the issue.I got an update from Docker today, and I got Docker desktop-3.0.1 (50773).
Now I get an error while running Test container.
...... <<< ERROR! org.testcontainers.containers.ContainerLaunchException: Container startup failed Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=postgres:11.7, imagePullPolicy=DefaultPullPolicy()) Caused by: com.github.dockerjava.api.exception.NotFoundException: {"message":"No such image: testcontainersofficial/ryuk:0.3.0"}
I assumed you fixed it. I also disabled the Use gRPC FUSE for file sharing option, but it didn’t help.
How can I fix this ?
@jdelucaa yes, this Docker API change applies to most of Testcontainers versions.
@DaspawnW this is not junit specific and, once released, will work with any type of integration (junit4, junit jupiter, spock, manual container lifecycle)
@gesellix we definitely pull the image if it is not available.
In that case, an error would differ (unless the Docker Hub team have decided that
404
is a perfect http status code for a rate limited response, which should be 5xx instead)That’s what I was worried about, yea. But I’m not sure if that’s what’s going on or not yet.