Add support for Docker Engine 29
Docker Desktop 4.52.0 upgrades Docker Engine to 29.0.0 which upgrades the API version to 1.44 which doesn't seem to work with testcontainers:
o.t.d.DockerClientProviderStrategy : Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
NpipeSocketClientProviderStrategy: failed with exception BadRequestException (Status 400: {"ID":"","Containers":0,"ContainersRunning":0,"ContainersPaused":0,"ContainersStopped":0,"Images":0,"Driver":"","DriverStatus":null,"Plugins":{"Volume":null,"Network":null,"Authorization":null,"Log":null},"MemoryLimit":false,"SwapLimit":false,"CpuCfsPeriod":false,"CpuCfsQuota":false,"CPUShares":false,"CPUSet":false,"PidsLimit":false,"IPv4Forwarding":false,"Debug":false,"NFd":0,"OomKillDisable":false,"NGoroutines":0,"SystemTime":"","LoggingDriver":"","CgroupDriver":"","NEventsListener":0,"KernelVersion":"","OperatingSystem":"","OSVersion":"","OSType":"","Architecture":"","IndexServerAddress":"","RegistryConfig":null,"NCPU":0,"MemTotal":0,"GenericResources":null,"DockerRootDir":"","HttpProxy":"","HttpsProxy":"","NoProxy":"","Name":"","Labels":["com.docker.desktop.address=npipe://\\\\.\\pipe\\docker_cli"],"ExperimentalBuild":false,"ServerVersion":"","Runtimes":null,"DefaultRuntime":"","Swarm":{"NodeID":"","NodeAddr":"","LocalNodeState":"","ControlAvailable":false,"Error":"","RemoteManagers":null},"LiveRestoreEnabled":false,"Isolation":"","InitBinary":"","ContainerdCommit":{"ID":""},"RuncCommit":{"ID":""},"InitCommit":{"ID":""},"SecurityOptions":null,"CDISpecDirs":null,"Warnings":null})
As no valid configuration was found, execution cannot continue.
It can connect to the pipe, but
strategy.getDockerClient().infoCmd().exec(); now throws exception because Docker returns that 400 Bad request status for it.
See https://github.com/fabric8io/docker-maven-plugin/commit/17c081e482a34e43e0f7faefbae343edca054620, it might help.
Thanks for the issue. Contribution is welcome. What version of playtika testcontainers do you use? You may also override the org.testcontainers dependency if you are using an old version.
I've tested with latest version is 3.1.18 and it still fails.
The good news is that the official workaround works, setting "min-api-version": "1.24" in the config.
@andrei-ivanov One of quick solution to fix it to prev versions. Create at HOME directory new file ~/.docker-java.properties with content "api.version=1.44"
Setting the system property, like with -Dapi.version=1.44 (or any version above it) also works.
The main cause of this one is that this library is still working with tescontainers v1. On v2, specifically, 2.0.2 this has been solved: https://github.com/testcontainers/testcontainers-java/releases/tag/2.0.2
The testcontainers dependency currently comes through spring-boot-dependencies, and on version 3.5.7 it still points to v1. Spring Boot 4 has migrated to v2 already.
spring boot v4 with testcontainers v2 is in progress https://github.com/PlaytikaOSS/testcontainers-spring-boot/pull/2677. Contributions are welcome