List<Image> listAllImages() { try { return dockerClient.listImagesCmd().withShowAll(true).exec(); } catch (RuntimeException e) { numberOfDockerDaemonFails.add(); throw new DockerException("Failed to list all images", e); } }
/** * Performs a list images request * * @param client * @param message * @return */ private ListImagesCmd executeListImagesRequest(DockerClient client, Message message) { LOGGER.debug("Executing Docker Images List Request"); ListImagesCmd listImagesCmd = client.listImagesCmd(); String filter = DockerHelper.getProperty(DockerConstants.DOCKER_FILTER, configuration, message, String.class); if (filter != null) { listImagesCmd.withLabelFilter(filter); } Boolean showAll = DockerHelper.getProperty(DockerConstants.DOCKER_SHOW_ALL, configuration, message, Boolean.class); if (showAll != null) { listImagesCmd.withShowAll(showAll); } return listImagesCmd; }