private static Optional<? extends DockerClientProviderStrategy> loadConfiguredStrategy() {
        String configuredDockerClientStrategyClassName = TestcontainersConfiguration
            .getInstance()
            .getDockerClientStrategyClassName();

        return Stream
            .of(configuredDockerClientStrategyClassName)
            .filter(Objects::nonNull)
            .flatMap(it -> {
                try {
                    Class<? extends DockerClientProviderStrategy> strategyClass = (Class) Thread
                        .currentThread()
                        .getContextClassLoader()
                        .loadClass(it);
                    return Stream.of(strategyClass.newInstance());
                } catch (ClassNotFoundException e) {
                    log.warn(
                        "Can't instantiate a strategy from {} (ClassNotFoundException). " +
                        "This probably means that cached configuration refers to a client provider " +
                        "class that is not available in this version of Testcontainers. Other " +
                        "strategies will be tried instead.",
                        it
                    );
                    return Stream.empty();
                } catch (InstantiationException | IllegalAccessException e) {
                    log.warn("Can't instantiate a strategy from {}", it, e);
                    return Stream.empty();
                }
            })
            // Ignore persisted strategy if it's not persistable anymore
            .filter(DockerClientProviderStrategy::isPersistable)
            .peek(strategy -> {
                log.info(
                    "Loaded {} from ~/.testcontainers.properties, will try it first",
                    strategy.getClass().getName()
                );
            })
            .findFirst();
    }
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