private void pushImage(Image image, ServiceSpec serviceSpec, BuildContext context) throws HyscaleException {
        String registryUrl = serviceSpec
                .get(HyscaleSpecFields.getPath(HyscaleSpecFields.image, HyscaleSpecFields.registry), String.class);
        ImageRegistry pushRegistry = context.getRegistriesMap().get(registryUrl);
        if (pushRegistry == null) {
            WorkflowLogger.startActivity(ImageBuilderActivity.IMAGE_PUSH);
            WorkflowLogger.endActivity(Status.SKIPPING);
            return;
        }
        String logFilePath = imageBuilderConfig.getDockerPushLogDir(context.getAppName(), context.getServiceName());
        String pushImage = ImageUtil.getImage(image);
        ImagePushEvent event = new ImagePushEvent(ActivityState.STARTED, pushImage, logFilePath);
        publisher.publishEvent(event);
        try {
            String shaSum = hyscaleDockerClient.push(image, pushRegistry, logFilePath, context.isVerbose());
            context.setImageShaSum(shaSum);
            event = new ImagePushEvent(ActivityState.DONE, pushImage, logFilePath);
        } catch (HyscaleException e) {
            event = new ImagePushEvent(ActivityState.FAILED, pushImage, logFilePath);
            throw e;
        } finally {
            publisher.publishEvent(event);
            context.setPushLogs(logFilePath);
        }
    }
Only need to pull in case of stack as service image for tagging
 In other cases docker build will internally take care of pulling the image
 
@param sourceImage
@param registryMap 
@param context
@throws HyscaleException
image-builder/builder-services/src/main/java/io/hyscale/builder/services/impl/LocalImageBuildPushServiceImpl.java