public static Optional<DockerClient> resolve(Map<String, String> parameters) {
    ServiceLoader<DockerClient> dockerClients = ServiceLoader.load(DockerClient.class);
    for (DockerClient dockerClient : dockerClients) {
      if (dockerClient.supported(parameters)) {
        return Optional.of(dockerClient);
      }
    }
    return Optional.empty();
  }
Look for supported DockerClient.

@param parameters needed by the dockerClient
@return dockerClient if any is found
jib-core/src/main/java/com/google/cloud/tools/jib/docker/DockerClientResolver.java