Skip to content

Update testcontainers to a version that works with Docker v29#136

Merged
rtyley merged 1 commit intomainfrom
update-testcontainers
Feb 20, 2026
Merged

Update testcontainers to a version that works with Docker v29#136
rtyley merged 1 commit intomainfrom
update-testcontainers

Conversation

@ioannakok
Copy link
Contributor

@ioannakok ioannakok commented Feb 20, 2026

The etag-caching project has one test (S3ObjectFetchingTest) that depends on S3Mock/testcontainers-java and thus on Docker Containers. A recent version of Docker (v29, in November 2025) updated their Docker API requirement, meaning that S3ObjectFetchingTest fails like this on dev laptops using recent versions of Docker Desktop:

[info] com.gu.etagcaching.aws.sdkv2.s3.S3ObjectFetchingTest *** ABORTED ***
[info]   java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration
[info]   at org.testcontainers.dockerclient.DockerClientProviderStrategy.lambda$getFirstValidStrategy$7(DockerClientProviderStrategy.java:274)
[info]   at java.base/java.util.Optional.orElseThrow(Optional.java:403)
[info]   at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:265)
[info]   at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:154)
[info]   at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:196)
[info]   at org.testcontainers.DockerClientFactory$1.getDockerClient(DockerClientFactory.java:108)
[info]   at com.github.dockerjava.api.DockerClientDelegate.authConfig(DockerClientDelegate.java:109)
[info]   at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:321)
[info]   at com.gu.etagcaching.aws.sdkv2.s3.S3ObjectFetchingTest.beforeAll(S3ObjectFetchingTest.scala:38)
[info]   at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:212)

Note that this is also the same failure we see when Docker Desktop is not running on the machine.

GitHub Actions also recently adopted this version of Docker:

See:

We're using S3Mock v4.11.0, which is the latest version of S3Mock that's been released or tagged. However, it looks like there has been some (unreleased) work on v5.0.0 of S3Mock:

...when that new version of S3Mock is released, we won't need to explicitly force the testcontainers-java update anymore.

See also

So that tests run with the latest version of Docker

Co-authored-by: Roberto Tyley <52038+rtyley@users.noreply.github.com>
Co-authored-by: Marjan K <15894063+marjisound@users.noreply.github.com>
@ioannakok ioannakok requested a review from a team as a code owner February 20, 2026 12:21
@ioannakok ioannakok added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Feb 20, 2026
@rtyley rtyley merged commit bf75f3b into main Feb 20, 2026
9 of 10 checks passed
@rtyley rtyley deleted the update-testcontainers branch February 20, 2026 14:20
@rtyley rtyley changed the title Update testcontainers Update testcontainers to a version that works with Docker v29 Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Departmental tracking: maintenance work, not a fix or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants