protected DockerClient buildDockerClient() throws MojoExecutionException {

    final DefaultDockerClient.Builder builder;
    try {
      builder = getBuilder();

      final String dockerHost = rawDockerHost();
      if (!isNullOrEmpty(dockerHost)) {
        builder.uri(dockerHost);
      }
      final Optional<DockerCertificatesStore> certs = dockerCertificates();
      if (certs.isPresent()) {
        builder.dockerCertificates(certs.get());
      }
    } catch (DockerCertificateException ex) {
      throw new MojoExecutionException("Cannot build DockerClient due to certificate problem", ex);
    }

    builder.registryAuthSupplier(authSupplier());

    return builder.build();
  }
Flag to skip docker push, making push goal a no-op. This can be useful when docker:push
is bound to deploy goal, and you want to deploy a jar but not a container. Defaults to false.
src/main/java/com/spotify/docker/AbstractDockerMojo.java