Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker cleanup plugin #333

Closed
sushant-pradhan opened this issue Sep 24, 2020 · 6 comments
Closed

Docker cleanup plugin #333

sushant-pradhan opened this issue Sep 24, 2020 · 6 comments
Labels
type: feature request New feature or request

Comments

@sushant-pradhan
Copy link

It will be good to have docker images cleanup in line with the artifactCleanup plugin. Basically allow deletion on docker images based on last download date.

Inspired from a standalone script: https://jfrog.com/knowledge-base/how-to-clean-up-old-docker-images/

@DarthFennec
Copy link
Contributor

@sushant-pradhan
Copy link
Author

sushant-pradhan commented Sep 25, 2020

Hey @DarthFennec yes I did. The plugin unfortunately is not as good as artifactCleanup plugin for 2 reasons:

  • It needs a build time label/property to be set/passed. This is not always possible if you have multiple CI systems or process pushing images
  • The approach of deleting images based on download date looks to be most apt (instead of just deleting by count as the cleanDockerImages does). The jfrog blog covers the approach well and in fact dockerhub is also implementing similar approach for cleaning up inactive images: https://www.docker.com/pricing/resource-consumption-updates

@weakcamel
Copy link
Contributor

weakcamel commented Nov 24, 2021

It needs a build time label/property to be set/passed. This is not always possible if you have multiple CI systems or process pushing images

That's what it says on the tin yet not exactly how it works.

If you apply one or both properties on manifest.json file, it works just as well:

docker.label.com.jfrog.artifactory.retention.maxCount
docker.label.com.jfrog.artifactory.retention.maxDays

Granted, one can consider this a "hack".


Generally and IMO: baking in the property as a Docker label is not great for a few reasons. This data is immutable, which means:

  • you can't have different retention policies between repositories which is typical when using image promotion
    • e.g. as a product manager, I would like to set retention of 1 month for a docker-dev repository but the same image - if promoted to docker-production - should be kept for min. 2 years
  • you can't reliably "pin" a specific image to not be deleted
  • not a big deal yet ... it exposes internal information (i.e. that you're internally a user of Artifactory) within the public artifacts you'd make available to the customers

@fluxxBot
Copy link
Contributor

Thank you for submitting your feature request. Every user comment is valued by us. However, as this request has been outstanding for some time and no action has been taken, we are closing it for the time being. If you think this feature is still needed or have any updates, please review it again or submit a new request with the most recent details.

@weakcamel
Copy link
Contributor

weakcamel commented Nov 14, 2024

@fluxxBot This is that's pretty much why Jfrog is becoming more and more irrelevant where I work. We've downgraded our license already and started migrating Docker images we hosted on Artifactory to another container registry.

There are new features released all the time including features nobody needs or wants (like Jfrog pipelines !?) while at the same time requests for basic, essential functionality get ignored and important bugs go unfixed for years with no action - this is just one of such examples.

@fluxxBot
Copy link
Contributor

Thank you for your feedback regarding JFrog products.
Please rest assured that we are committed to addressing the core functionalities that are most important to our users.
In response to your original inquiry, we're excited to introduce the Cleanup Policies feature, which enables the automated cleanup of Docker images and other artifacts based on flexible criteria, such as the last download date. This feature is designed to meet your needs effectively.

For more information on implementing Cleanup Policies and the supported packages, please visit:

We appreciate your continued feedback as we enhance our offerings. If you have any further questions or need assistance, please feel free to reach out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants