List<Container> containers = dockerClient.containers().finder().allContainers(false).list();
if (ami == null)
return containers.size();
List<Image> images = dockerClient.images().finder().allImages(true).filter(ami).list();
LOGGER.log(Level.INFO, "Images found: " + images);
if (images.size() == 0) {
LOGGER.log(Level.INFO, "Pulling image " + ami + " since one was not found. This may take awhile...");
Identifier amiId = Identifier.fromCompoundString(ami);