testcontainers / testcontainers-java

Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
https://testcontainers.org
MIT License
8.04k stars 1.66k forks source link

[Bug]: Dynalite image no longer supported by docker and cannot be pulled #9529

Closed DonIsiko closed 1 week ago

DonIsiko commented 1 week ago

Module

Dynalite

Testcontainers version

1.20.3

Using the latest Testcontainers version?

Yes

Host OS

macOS

Host Arch

ARM

Docker version

4.33.0

What happened?

When attempting to run an application test using dynalite test containers

org.testcontainers dynalite

We're getting this error, are there alternative docker images that we can use? or can this image be updated?

Relevant log output

Exception in thread "main" java.lang.ExceptionInInitializerError
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:421)
    at java.base/java.lang.Class.forName(Class.java:412)
    at com.[REDACTED].JUnit5TestRunnerUtil.loadMethodByReflection(JUnit5TestRunnerUtil.java:126)
    at com.[REDACTED].JUnit5TestRunnerUtil.buildRequest(JUnit5TestRunnerUtil.java:102)
    at com.[REDACTED].JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:43)
    at com.[REDACTED].IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
    at com.[REDACTED].execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
    at com.[REDACTED].IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
    at com.[REDACTED].JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
    at com.[REDACTED].JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=quay.io/testcontainers/dynalite:v1.2.1-1, imagePullPolicy=DefaultPullPolicy(), imageNameSubstitutor=org.testcontainers.utility.ImageNameSubstitutor$LogWrappedImageNameSubstitutor@61078690)
    at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1367)
    at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:362)
    at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:333)
    at [REDACTED].BaseApplicationTestConfig.<clinit>(BaseApplicationTestConfig.java:107)
    ... 11 more
Caused by: org.testcontainers.containers.ContainerFetchException: Failed to get Docker client for quay.io/testcontainers/dynalite:v1.2.1-1
    at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:125)
    at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:28)
    at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:20)
    at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:41)
    at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1365)
    ... 14 more
Caused by: com.github.dockerjava.api.exception.DockerClientException: Could not pull image: [DEPRECATION NOTICE] Docker Image Format v1 and Docker Image manifest version 2, schema 1 support is disabled by default and will be removed in an upcoming release. Suggest the author of quay.io/testcontainers/dynalite:v1.2.1-1 to upgrade the image to the OCI Format or Docker Image manifest v2, schema 2. More information at https://docs.docker.com/go/deprecated-image-specs/
    at com.github.dockerjava.api.command.PullImageResultCallback.checkDockerClientPullSuccessful(PullImageResultCallback.java:97)
    at com.github.dockerjava.api.command.PullImageResultCallback.throwFirstError(PullImageResultCallback.java:112)
    at com.github.dockerjava.api.async.ResultCallbackTemplate.awaitCompletion(ResultCallbackTemplate.java:93)
    at org.testcontainers.images.TimeLimitedLoggedPullImageResultCallback.awaitCompletion(TimeLimitedLoggedPullImageResultCallback.java:58)
    at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:97)
    ... 18 more
Disconnected from the target VM, address: '[REDACTED]', transport: 'socket'

Additional Information

No response

eddumelendez commented 1 week ago

Hi, dynalite module is deprecated. I recommend to use localstack module