@Override
    public String push(Image image, ImageRegistry imageRegistry, String logfile, boolean isVerbose)
            throws HyscaleException {
        StringBuilder shaSum = new StringBuilder();
        ActivityContext pushActivity = new ActivityContext(ImageBuilderActivity.IMAGE_PUSH);
        WorkflowLogger.startActivity(pushActivity);

        AuthConfig authConfig = getAuthConfig(imageRegistry);

        DockerClient dockerClient = getDockerClient();

        // Push image
        String tag = StringUtils.isNotBlank(image.getTag()) ? image.getTag() : ImageUtil.DEFAULT_TAG;
        PushImageCmd pushImageCmd = dockerClient.pushImageCmd(ImageUtil.getImageWithoutTag(image)).withTag(tag)
                .withAuthConfig(authConfig);

        if (isVerbose) {
            WorkflowLogger.header(ImageBuilderActivity.IMAGE_PUSH_LOG);
        }
        PushImageResultCallback callback = new PushImageResultCallback() {
            @Override
            public void onNext(PushResponseItem item) {
                ErrorDetail errorDetail = item.getErrorDetail();
                String message = item.isErrorIndicated() && errorDetail != null ? errorDetail.getMessage()
                        : item.getStatus();
                handleOutput(message, logfile, pushActivity, isVerbose);
                if (item.isErrorIndicated()) {
                    logger.error("Error while pushing image: {}", errorDetail);
                    onError(new HyscaleException(ImageBuilderErrorCodes.FAILED_TO_PUSH_IMAGE));
                }
                if (StringUtils.isNotBlank(message) && message.contains(SHA256)) {
                    shaSum.setLength(0);
                    shaSum.append(getImageDigest(message));
                }
                super.onNext(item);
            }
        };

        try {
            pushImageCmd.exec(callback).awaitCompletion();
        } catch (RuntimeException e) {
            handleOutput(isVerbose, pushActivity, Status.FAILED);
            throw new HyscaleException(e, ImageBuilderErrorCodes.FAILED_TO_PUSH_IMAGE);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            handleOutput(isVerbose, pushActivity, Status.FAILED);
            throw new HyscaleException(e, ImageBuilderErrorCodes.FAILED_TO_PUSH_IMAGE);
        }
        handleOutput(isVerbose, pushActivity, Status.DONE);
        return StringUtils.isNotBlank(shaSum) ? shaSum.toString() : null;
    }
DockerClientImpl is docker client to docker daemon to perform all
image actions like pull image, tag image, push image etc.
It connects to the docker daemon through an environment
variable @see ImageBuilderConfig.getDockerHost() or through to
the default host based on the operating system.
image-builder/builder-services/src/main/java/io/hyscale/builder/services/docker/impl/DockerRESTClient.java