private static boolean tryOutStrategy(List<String> configurationFailures, DockerClientProviderStrategy strategy) {
        try {
            log.debug("Trying out strategy: {}", strategy.getClass().getSimpleName());

            if (!strategy.test()) {
                log.debug("strategy {} did not pass the test", strategy.getClass().getSimpleName());
                return false;
            }

            strategy.info = strategy.getDockerClient().infoCmd().exec();
            log.info("Found Docker environment with {}", strategy.getDescription());
            log.debug(
                "Transport type: '{}', Docker host: '{}'",
                TestcontainersConfiguration.getInstance().getTransportType(),
                strategy.getTransportConfig().getDockerHost()
            );

            log.debug("Checking Docker OS type for {}", strategy.getDescription());
            String osType = strategy.getInfo().getOsType();
            if (StringUtils.isBlank(osType)) {
                log.warn("Could not determine Docker OS type");
            } else if (!osType.equals("linux")) {
                log.warn("{} is currently not supported", osType);
                throw new InvalidConfigurationException(osType + " containers are currently not supported");
            }

            if (strategy.isPersistable()) {
                TestcontainersConfiguration
                    .getInstance()
                    .updateUserConfig("docker.client.strategy", strategy.getClass().getName());
            }

            return true;
        } catch (Exception | ExceptionInInitializerError | NoClassDefFoundError e) {
            @Nullable
            String throwableMessage = e.getMessage();
            @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
            Throwable rootCause = Throwables.getRootCause(e);
            @Nullable
            String rootCauseMessage = rootCause.getMessage();

            String failureDescription;
            if (throwableMessage != null && throwableMessage.equals(rootCauseMessage)) {
                failureDescription =
                    String.format(
                        "%s: failed with exception %s (%s)",
                        strategy.getClass().getSimpleName(),
                        e.getClass().getSimpleName(),
                        throwableMessage
                    );
            } else {
                failureDescription =
                    String.format(
                        "%s: failed with exception %s (%s). Root cause %s (%s)",
                        strategy.getClass().getSimpleName(),
                        e.getClass().getSimpleName(),
                        throwableMessage,
                        rootCause.getClass().getSimpleName(),
                        rootCauseMessage
                    );
            }
            configurationFailures.add(failureDescription);

            log.debug(failureDescription);
            return false;
        }
    }
Determine the right DockerClientConfig to use for building clients by trial-and-error.

@return a working DockerClientConfig, as determined by successful execution of a ping command
core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java