@Override
    public void tag(String source, Image dest) throws HyscaleException {
        WorkflowLogger.startActivity(ImageBuilderActivity.IMAGE_TAG);
        if (StringUtils.isBlank(source)) {
            WorkflowLogger.endActivity(Status.SKIPPING);
            return;
        }
        DockerClient dockerClient = getDockerClient();
        try {
            String tag = StringUtils.isNotBlank(dest.getTag()) ? dest.getTag() : ImageUtil.DEFAULT_TAG;
            TagImageCmd tagImageCmd = dockerClient.tagImageCmd(source, ImageUtil.getImageWithoutTag(dest), tag);
            tagImageCmd.exec();
        } catch (DockerException e) {
            logger.error("Error while tagging image",e);
            WorkflowLogger.endActivity(Status.FAILED);
            throw new HyscaleException(e, ImageBuilderErrorCodes.FAILED_TO_TAG_IMAGE);
        }
        WorkflowLogger.endActivity(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