private List<String> getPullRegistries(ServiceSpec serviceSpec) {
        List<String> pullRegistries = new ArrayList<>();
        String stackImage = stackImageProvider.getStackImageFromBuildSpec(serviceSpec);
        if (stackImage != null) {
            // buildSpec
            pullRegistries.add(stackImage.split("/")[0]);
        } else {
            // Dockerfile
            List<String> stackImages = stackImageProvider.getStackImagesFromDockerfile(serviceSpec);
            if (CollectionUtils.isNotEmpty(stackImages)) {
                Set<String> stackRegistries = stackImages.stream().filter(registry -> registry.split("/").length > 1)
                .map(registry -> registry.split("/")[0]).collect(Collectors.toSet());
                pullRegistries.addAll(stackRegistries);
            }
        }
        return pullRegistries;
    }
Pull registries include:
Stack image from build spec or
From field in user docker file
@param serviceSpec
@return
workflow-controller/controller-service/src/main/java/io/hyscale/controller/invoker/ImageBuildComponentInvoker.java