@Override
    public void pull(String image, ImageRegistry imageRegistry) throws HyscaleException {
        ActivityContext pullActivity = new ActivityContext(ImageBuilderActivity.IMAGE_PULL);
        WorkflowLogger.startActivity(pullActivity);
        if (StringUtils.isBlank(image)) {
            handleOutput(false, pullActivity, Status.SKIPPING);
            return;
        }
        DockerClient dockerClient = getDockerClient();
        PullImageCmd pullImageCmd = dockerClient.pullImageCmd(image);
        if (imageRegistry != null) {
            AuthConfig authConfig = getAuthConfig(imageRegistry);
            pullImageCmd.withAuthConfig(authConfig);
        }
        try {
            pullImageCmd.exec(new PullImageResultCallback() {
                @Override
                public void onNext(PullResponseItem item) {
                    super.onNext(item);
                    WorkflowLogger.continueActivity(pullActivity);
                }

            }).awaitCompletion();
        } catch (RuntimeException e) {
            logger.error("Error while pulling the image {}", image, e);
            handleOutput(false, pullActivity, Status.FAILED);
            throw new HyscaleException(e, ImageBuilderErrorCodes.FAILED_TO_PULL_IMAGE, image);
        } catch (InterruptedException e) {
            logger.error("Error while pulling the image {}", image, e);
            Thread.currentThread().interrupt();
            handleOutput(false, pullActivity, Status.FAILED);
            throw new HyscaleException(e, ImageBuilderErrorCodes.FAILED_TO_PULL_IMAGE, image);
        }
        handleOutput(false, pullActivity, Status.DONE);
    }
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