@Override
    public List<String> getImageIds(String imageName, Map<String, String> labels) throws HyscaleException {
        String imageIdsAsString = CommandExecutor
                .executeAndGetResults(imageCommandProvider.dockerImageIds(imageName, labels))
                .getCommandOutput();
        String[] imageIds = StringUtils.isNotBlank(imageIdsAsString) ? imageIdsAsString.split("\\s+") : null;
        if (imageIds == null || imageIds.length == 0) {
            logger.debug("No images found to clean from the host machine");
            return Collections.emptyList();
        }
        // Need to preserve the order of output, hence a LinkedHashset
        return new LinkedList<>(Arrays.asList(imageIds));
    }
Gets latest digest from inspect image command result.

@param result CommandResult obtained after executing docker inspect command.
              1.result is null  - null
              2.result not null - null if no digests
              - last digest if digests exist
@return digest latest digest from image command result.
image-builder/builder-services/src/main/java/io/hyscale/builder/services/docker/impl/DockerBinaryClient.java