Skip to content

Commit 69207ec

Browse files
geoandgsmet
authored andcommitted
Manually set api.version for TestContainers
This is done to overcome: ``` UnixSocketClientProviderStrategy: failed with 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"} ``` Fixes: #51002 (cherry picked from commit 683c59e)
1 parent 7f01318 commit 69207ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/deployment/src/main/java/io/quarkus/deployment/IsContainerRuntimeWorking.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.jboss.logging.Logger;
2020

2121
import io.quarkus.deployment.console.StartupLogCompressor;
22+
import io.quarkus.runtime.ResettableSystemProperties;
2223

2324
public abstract class IsContainerRuntimeWorking implements BooleanSupplier {
2425
private static final Logger LOGGER = Logger.getLogger(IsContainerRuntimeWorking.class);
@@ -63,7 +64,7 @@ public Result get() {
6364
// this runs in threads that start with 'ducttape'
6465
StartupLogCompressor compressor = new StartupLogCompressor("Checking Docker Environment", Optional.empty(), null,
6566
(s) -> s.getName().startsWith("ducttape"));
66-
try {
67+
try (ResettableSystemProperties ignored = ResettableSystemProperties.of("api.version", "1.44")) {
6768
Class<?> dockerClientFactoryClass = Thread.currentThread().getContextClassLoader()
6869
.loadClass("org.testcontainers.DockerClientFactory");
6970
Object dockerClientFactoryInstance = dockerClientFactoryClass.getMethod("instance").invoke(null);

0 commit comments

Comments
 (0)