@Override
    public List<String> getImageIds(String imageName, Map<String, String> labels) throws HyscaleException {
        ListImagesCmd listImageCmd = getDockerClient().listImagesCmd();
        if (StringUtils.isNotBlank(imageName)) {
            listImageCmd.withImageNameFilter(imageName);
        }
        if (labels != null) {
            listImageCmd.withLabelFilter(labels);
        }

        List<com.github.dockerjava.api.model.Image> imageList = listImageCmd.exec();
        if (imageList == null || imageList.isEmpty()) {
            logger.debug("No images found to clean from the host machine");
            return Collections.emptyList();
        }
        return imageList.stream().map(com.github.dockerjava.api.model.Image::getId).collect(Collectors.toCollection(LinkedList::new));
    }
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