Cannot remove images
Closed this issue · 1 comments
bvis commented
As far as I understand when we want to delete an image (with all its versions) we need to put the "keepimages" parameter to 0. But it does not work as expected. You can see it easily in the next example (I'm using a local built image to execute it).
$ docker run --rm -it cleanreg -r http://$REGISTRY_IP:5000 -v -n busybox2 --keepimages 1
Check if registry server supports v2...
Registry server supports v2!
==================================================>> 100%
will delete repo busybox2 and keep 1 images.
Skipping because found not enough images which can be deleted.
Aborted by user or nothing to delete.
$ docker run --rm -it cleanreg -r http://$REGISTRY_IP:5000 -v -n busybox2 --keepimages 0
usage: cleanreg.py [-h] [-v] -r REGISTRY [-p] [-q] [-n REPONAME]
[-k KEEPIMAGES] [-f REPOSFILE]
cleanreg.py: error: [-n] and [-k] has to be used together.
hcguersoy commented
Hi,
fixed with 5cc721.
Thanks for reporting :-)