private Dockerfile getDockerfile(Dockerfile userDockerfile, BuildContext context) throws HyscaleException {
        Dockerfile dockerfile = new Dockerfile();
        String dockerfilePath = getDockerfilePath(userDockerfile, context);
        validateDockerfilePath(dockerfilePath);
        dockerfile.setDockerfilePath(dockerfilePath);
        dockerfile.setArgs(userDockerfile != null ? userDockerfile.getArgs() : null);
        dockerfile.setTarget(userDockerfile != null ? userDockerfile.getTarget() : null);
        dockerfile.setPath(userDockerfile != null ? SetupConfig.getAbsolutePath(userDockerfile.getPath()) : null);
        return dockerfile;
    }
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