public static DockerClient getClientForConfig(TransportConfig transportConfig) {
        final DockerHttpClient dockerHttpClient;

        String transportType = TestcontainersConfiguration.getInstance().getTransportType();
        switch (transportType) {
            case "httpclient5":
                dockerHttpClient =
                    new ZerodepDockerHttpClient.Builder()
                        .dockerHost(transportConfig.getDockerHost())
                        .sslConfig(transportConfig.getSslConfig())
                        .build();
                break;
            default:
                throw new IllegalArgumentException("Unknown transport type '" + transportType + "'");
        }

        DefaultDockerClientConfig.Builder configBuilder = DefaultDockerClientConfig.createDefaultConfigBuilder();

        if (configBuilder.build().getApiVersion() == RemoteApiVersion.UNKNOWN_VERSION) {
            configBuilder.withApiVersion(RemoteApiVersion.VERSION_1_32);
        }
        Map<String, String> headers = new HashMap<>();
        headers.put("x-tc-sid", DockerClientFactory.SESSION_ID);
        headers.put("User-Agent", String.format("tc-java/%s", DockerClientFactory.TESTCONTAINERS_VERSION));

        return DockerClientImpl.getInstance(
            new AuthDelegatingDockerClientConfig(
                configBuilder.withDockerHost(transportConfig.getDockerHost().toString()).build()
            ),
            new HeadersAddingDockerHttpClient(dockerHttpClient, headers)
        );
    }
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