artifactory-cleanup icon indicating copy to clipboard operation
artifactory-cleanup copied to clipboard

Add option KeepLatestNImages

Open mikaello opened this issue 2 years ago • 2 comments

When cleaning images, it is possible to use the option KeepLatestNFiles. But this will look at docker tags, and not docker images.

Example:

If you got 3 images, both tagged with 2 tags each, so in total, you got 6 tags. If you run artifactory-cleanup with KeepLatestNFiles count=2 you may end up in the situation that you only have a single image left (with 2 tags), because each tag is counted as a file.

Proposal:

What I propose is an option, KeepLatestNImages, that only looks at the image digest, and for those images that are older, it will delete all tags. So in the example above you will be left with 2 images (still with 2 tags each, 4 in total).

mikaello avatar May 04 '23 06:05 mikaello

any news on that?

Rommmmm avatar Jan 21 '24 12:01 Rommmmm

No, we are looking for help here!

allburov avatar Jan 22 '24 10:01 allburov