diff --git a/salt/common/tools/sbin/so-docker-prune b/salt/common/tools/sbin/so-docker-prune index 1b6242488..06e05d7dc 100755 --- a/salt/common/tools/sbin/so-docker-prune +++ b/salt/common/tools/sbin/so-docker-prune @@ -40,10 +40,9 @@ def get_image_version(string) -> str: def main(quiet): client = docker.from_env() - # Get list of non-dangling images image_list = client.images.list(filters={ 'dangling': False }) - # Map image objects to flattened list of tags (format: "name:version") + # Map list of image objects to flattened list of tags (format: "name:version") tag_list = list(chain.from_iterable(list(map(lambda x: x.attrs.get('RepoTags'), image_list)))) # Filter to only SO images (base name begins with "so-")