hcguersoy/cleanreg

Deleting wrong images if tagged more than once

derwebcoder opened this issue · 2 comments

cleanreg deletes images which are tagged twice, even if setting --ignore option. Looks like --ignore is only checking for duplicates in the same repository.

Having an image example-a:test-123 and tagging it additionally example-b:test-123. Both will have the same digest. Running cleanreg for example-b and deleting the image, it will also delete example-a, even if --ignore option has been set.

There is some discussions about this in the docker distribution project, somehow a bit unstrucutured. see distribution/distribution#2170

Should be fixed with the commit above. Please check version 0.5.0 if it is OK now. I've added some new tests too, to be sure that we cover this but just wondering why the tests before run successfully.