factory reset now works with image dependencies
@@ -689,12 +689,16 @@ class Action:
except Exception as e: # pragma: no cover
error_message += "Error removing Vent containers: " + str(e) + "\n"
- # remove images
try:
i_list = set(self.d_client.images.list(filters={'label': 'vent'},
all=True))
for i in i_list:
+ # delete tagged images only because they are the parents for
+ # the untagged images. Remove the parents and the children get
+ # removed automatically
+ if i.attrs['RepoTags']:
self.d_client.images.remove(image=i.id, force=True)
+
except Exception as e: # pragma: no cover
error_message += "Error deleting Vent images: " + str(e) + "\n"
