Interface DockerClientBuilder<B extends DockerClientBuilder<B>>

Type Parameters:
B - the type of the builder
All Known Implementing Classes:
BaseDockerClientBuilder, JerseyDockerClientBuilder, ResteasyDockerClientBuilder

public interface DockerClientBuilder<B extends DockerClientBuilder<B>>
DockerClientBuilder is an interface which has to be implemented from clients when they need to use a JAXRS client implementation other than the provided Jersey
Author:
Dimitris Mandalidis
See Also:
  • Method Details

    • uri

      URI uri()
      Returns:
      the URI of the Docker engine
    • fromEnv

      B fromEnv() throws DockerCertificateException
      Sets or overwrites uri() and dockerCertificates(DockerCertificatesStore) according to the values present in DOCKER_HOST and DOCKER_CERT_PATH environment variables.
      Returns:
      Modifies a builder that can be used to further customize and then build the client.
      Throws:
      DockerCertificateException - if we could not build a DockerCertificates object
    • uri

      B uri(URI uri)
    • uri

      B uri(String uri)
    • build

    • header

      B header(String name, Object value)
      Adds additional headers to be sent in all requests to the Docker Remote API.
      Parameters:
      name - the header name
      value - the header value
      Returns:
      this
    • registryAuthSupplier

      B registryAuthSupplier(RegistryAuthSupplier registryAuthSupplier)
    • connectionPoolSize

      B connectionPoolSize(int connectionPoolSize)
      Set the size of the connection pool for connections to Docker. Note that due to a known issue, DefaultDockerClient maintains two separate connection pools, each of which is capped at this size. Therefore, the maximum number of concurrent connections to Docker may be up to 2 * connectionPoolSize.
      Parameters:
      connectionPoolSize - connection pool size
      Returns:
      Builder
    • useProxy

      B useProxy(boolean useProxy)
      Allows connecting to Docker Daemon using HTTP proxy.
      Parameters:
      useProxy - tells if Docker Client has to connect to docker daemon using HTTP Proxy
      Returns:
      Builder
    • apiVersion

      B apiVersion(String apiVersion)
      Set the Docker API version that will be used in the HTTP requests to Docker daemon.
      Parameters:
      apiVersion - String for Docker API version
      Returns:
      Builder
    • connectTimeoutMillis

      B connectTimeoutMillis(long connectTimeoutMillis)
      Set the timeout in milliseconds until a connection to Docker is established. A timeout value of zero is interpreted as an infinite timeout.
      Parameters:
      connectTimeoutMillis - connection timeout to Docker daemon in milliseconds
      Returns:
      Builder
    • readTimeoutMillis

      B readTimeoutMillis(long readTimeoutMillis)
      Set the SO_TIMEOUT in milliseconds. This is the maximum period of inactivity between receiving two consecutive data packets from Docker.
      Parameters:
      readTimeoutMillis - read timeout to Docker daemon in milliseconds
      Returns:
      Builder
    • dockerCertificates

      B dockerCertificates(DockerCertificatesStore dockerCertificatesStore)
      Provide certificates to secure the connection to Docker.
      Parameters:
      dockerCertificatesStore - DockerCertificatesStore object
      Returns:
      Builder
    • entityProcessing

      B entityProcessing(DockerClientBuilder.EntityProcessing entityProcessing)
      Allows setting transfer encoding. CHUNKED does not send the content-length header while BUFFERED does.

      By default ApacheConnectorProvider uses CHUNKED mode. Some Docker API end-points seems to fail when no content-length is specified but a body is sent.

      Parameters:
      entityProcessing - is the requested entity processing to use when calling docker daemon (tcp protocol).
      Returns:
      Builder