Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
Description
Module
Core
Testcontainers version
1.21.3
Using the latest Testcontainers version?
No
Host OS
MacOs 15.6.1
Host Arch
ARM
Docker version
Client: Docker Engine - Community
Version: 27.2.1
API version: 1.47
Go version: go1.23.1
Git commit: 9e34c9bb39
Built: Fri Sep 6 12:01:30 2024
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.52.0 (210994)
Engine:
Version: 29.0.1
API version: 1.52 (minimum version 1.44)
Go version: go1.25.4
Git commit: 198b5e3
Built: Fri Nov 14 16:18:20 2025
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: v2.1.5
GitCommit: fcd43222d6b07379a4be9786bda52438f0dd16a1
runc:
Version: 1.3.3
GitCommit: v1.3.3-0-gd842d771
docker-init:
Version: 0.19.0
GitCommit: de40ad0What happened?
Tried to start a container, got 400 HTTP error communicating with Docker engine preventing the container from starting.
Switching to test-containers 2.0.2 fixed the issue, but cannot upgrade the whole project.
Relevant log output
Caused by: com.github.dockerjava.api.exception.BadRequestException: Status 400: {"message":"client version 1.32 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version"}
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:237)
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.post(DefaultInvocationBuilder.java:124)
at org.testcontainers.shaded.com.github.dockerjava.core.exec.CreateContainerCmdExec.execute(CreateContainerCmdExec.java:37)
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:33)
at org.testcontainers.shaded.com.github.dockerjava.core.command.CreateContainerCmdImpl.exec(CreateContainerCmdImpl.java:608)
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:430)Additional Information
No response
Reacted by Draget, Jan Ochwat, Lazar Najdenov, Fouad Almalki, Paul Bernet, Ruslan Stelmachenko, NLxDoDge, Alexey Tereshchenko, Thiago dos Santos Hora, Thomas Naskali and 3 more
Reacted by Jon Bayle
Activity
jobayle commentedon Nov 21, 2025
Ok I've spent the morning trying to figure out what's wrong with my setup, but it was a protocol update in the new docker version.
Your error message is way more explicit than mine, see:
Switching to tc-java 2.0.2 works, with tc-postgres at 1.21.3
llencucha-bitso commentedon Nov 21, 2025
Hey there,
this is how to fix the minimum API version requirement (which is 1.32 by default, but latest docker requires 1.44):
dragetd commentedon Nov 21, 2025
I can confirm this broke our testcontainers setup as well. The sad thing is, that the errors are not logged in the normal case, leaving me down a long route of debugging before finding this out.
I was using the GitLab Service Feature with the image:
The gradle error log was just:
Only after enabling debug in gradle, I got the whole error:
Using Testcontainer 1.21.
The 'docker:did' Image I use in the CI was probably the culprit, since it is a mutable tag. I'll upgrade to testcontaienrs 2.x and see if this helps.EDIT: IT was not my docker:dind image, and I am not really sure how this happened to be honest...
EDIT2: Yes, it WAS docker:dind that caused this issue... I just had another issue in parallel, that made debugging hard. Anyways, after using docker:28-dind in my CI, the error above was solved, without updating testcontainers.
jobayle commentedon Nov 21, 2025
@llencucha-bitso wrote:
What does it do? is it something read by tc-java to make it use the proper API?
llencucha-bitso commentedon Nov 21, 2025
@jobayle
Yes. By default, if no version is set, testcontainers picks 1.32, which is not supported by Docker desktop anymore. Minimum version is 1.44, current version is 1.52
seregamorph commentedon Nov 24, 2025
Hint: as a fast fix, you can download older Docker Desktop
4.51.0from https://docs.docker.com/desktop/release-notes/#4510eddumelendez commentedon Nov 24, 2025
workarounds has been shared in the previous issue. See #11212
aistomin commentedon Nov 24, 2025
Why did you close the issue? Was the problem solved? You close it as a duplicate and reference "workarounds". According to Cambridge dictionary workaround is:
The problem with software is still not solved, or is it?
fix: upgrade to TestContainers 2.0.2 for Docker API 1.44 compatibility
bug: Fix testcontainers issue
1812Vedant commentedon Mar 28, 2026
Yes this works for me thanks I lot I was trying to resolve issue from month
Feat(auth): protect routes — JWT-validated /api/me + frontend auth ga…
chore(77): bump Testcontainers 1.21.3 -> 2.0.5 + mark AUTO-UAT item 5…
test: pin docker-java API version to 1.44 for Docker 29 compatibility
fix: pin Docker API version 1.44 for Testcontainers on Docker Engine 29