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

ContainerFetchException when running in Gitub CI #235

Open
albertoadami opened this issue Sep 19, 2022 · 0 comments
Open

ContainerFetchException when running in Gitub CI #235

albertoadami opened this issue Sep 19, 2022 · 0 comments

Comments

@albertoadami
Copy link

Hello to everyone,

I'm running some sbt/scala project that's using the test-container-scala library. In particular I'm using the following dependencies:

    "com.dimafeng" %% "testcontainers-scala-scalatest" % "0.36.1" % IntegrationTest,
    "com.dimafeng" %% "testcontainers-scala-postgresql" % "0.36.1" % IntegrationTest,

Locally I'm able to run all the integration correcly, when I try to use the Github CI I'm getting this error here:

[info] it.adami.api.user.repository.DatabaseManagerSpec *** ABORTED ***
[info]   org.testcontainers.containers.ContainerLaunchException: Container startup failed
[info]   at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:322)
[info]   at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:302)
[info]   at com.dimafeng.testcontainers.SingleContainer.start(Container.scala:46)
[info]   at com.dimafeng.testcontainers.ForAllTestContainer.run(ForAllTestContainer.scala:17)
[info]   at com.dimafeng.testcontainers.ForAllTestContainer.run$(ForAllTestContainer.scala:13)
[info]   at it.adami.api.user.repository.DatabaseManagerSpec.run(DatabaseManagerSpec.scala:7)
[info]   at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
[info]   at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:516)
[info]   at sbt.TestRunner.runTest$1(TestFramework.scala:[139](https://github.com/albertoadami/user-api-service-example/actions/runs/3081301136/jobs/4979688415#step:7:140))
[info]   at sbt.TestRunner.run(TestFramework.scala:154)
[info]   ...
[info]   Cause: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageNameFuture=java.util.concurrent.CompletableFuture@634a0208[Completed normally], imagePullPolicy=DefaultPullPolicy(), dockerClient=LazyDockerClient.INSTANCE)
[info]   at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1265)
[info]   at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:600)
[info]   at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:311)
[info]   at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:302)
[info]   at com.dimafeng.testcontainers.SingleContainer.start(Container.scala:46)
[info]   at com.dimafeng.testcontainers.ForAllTestContainer.run(ForAllTestContainer.scala:17)
[info]   at com.dimafeng.testcontainers.ForAllTestContainer.run$(ForAllTestContainer.scala:13)
[info]   at it.adami.api.user.repository.DatabaseManagerSpec.run(DatabaseManagerSpec.scala:7)
[info]   at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
[info]   at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:516)
[info]   ...
[info]   Cause: com.github.dockerjava.api.exception.NotFoundException: {"message":"No such image: quay.io/testcontainers/ryuk:0.2.3"}
[info]   at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.execute(OkHttpInvocationBuilder.java:281)
[info]   at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.execute(OkHttpInvocationBuilder.java:265)
[info]   at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.post(OkHttpInvocationBuilder.java:136)
[info]   at com.github.dockerjava.core.exec.CreateContainerCmdExec.execute(CreateContainerCmdExec.java:33)
[info]   at com.github.dockerjava.core.exec.CreateContainerCmdExec.execute(CreateContainerCmdExec.java:13)
[info]   at com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
[info]   at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
[info]   at com.github.dockerjava.core.command.CreateContainerCmdImpl.exec(CreateContainerCmdImpl.java:1139)
[info]   at org.testcontainers.utility.ResourceReaper.start(ResourceReaper.java:91)
[info]   at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:[155](https://github.com/albertoadami/user-api-service-example/actions/runs/3081301136/jobs/4979688415#step:7:156))
[info]   ...

Any idea about the issue?

@albertoadami albertoadami changed the title ContainerFetchException when running in Gitlab CI ContainerFetchException when running in Gitub CI Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant