docs: public static Builder fromEnv() throws DockerCertificateException {
      final String endpoint = DockerHost.endpointFromEnv();
      final Path dockerCertPath = Paths.get(firstNonNull(DockerHost.certPathFromEnv(),
                                                         DockerHost.defaultCertPath()));
  
      final Builder builder = new Builder();
  
      final Optional<DockerCertificatesStore> certs = DockerCertificates.builder()
          .dockerCertPath(dockerCertPath).build();
  
      if (endpoint.startsWith(UNIX_SCHEME + "://")) {
        builder.uri(endpoint);
      } else if (endpoint.startsWith(NPIPE_SCHEME + "://")) {
        builder.uri(endpoint);
      } else {
        final String stripped = endpoint.replaceAll(".*://", "");
        final HostAndPort hostAndPort = HostAndPort.fromString(stripped);
        final String hostText = hostAndPort.getHost();
        final String scheme = certs.isPresent() ? "https" : "http";
  
        final int port = hostAndPort.getPortOrDefault(DockerHost.defaultPort());
        final String address = isNullOrEmpty(hostText) ? DockerHost.defaultAddress() : hostText;
  
        builder.uri(scheme + "://" + address + ":" + port);
      }
  
      if (certs.isPresent()) {
        builder.dockerCertificates(certs.get());
      }
  
      return builder;
    }