-
Notifications
You must be signed in to change notification settings - Fork 113
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
Cleanup functionality - e.g. keep "latest" and things newer than <n> days #82
Comments
Hi Don, A core feature needed for most of our future work is a metadata api, to track things, like policies. A very brief doc is here: https://github.com/SteveLasker/acr/tree/master/preview/metadata If you'd like to help us shape ACR, I'd like to invite you to the preview group: https://aka.ms/acr/preview/signup |
Thanks! The relaxed limits is a good thing - but we still will need to do some housekeeping earlier than you have finished the autopurge or policies, I fear. I whipped up something real quick, which seems to work, but ran into #83. I will consider joining the preview group, thanks for the pointer! |
The metadata API is also used for us to do some indexing, to speed up requests on manifest listing. I'm just checking when that rolls out and confirming it will solve the specific manifest listing issue.
|
I found the handling of the manifests and corresponding image tags fairly intuitive and flexible. If it just were a little faster, I would be very happy with it actually. |
Thanks @DonMartin76 , |
We use an auto incrementing build ID generated from Azure Pipelines, so we needed a quick way just to purge older images based on the tag ID. I wrote this quick shell script to purge images older than the 10th image. Could easily be modified just to require a "delete before x date" reference. https://github.com/jeffbeagley/azure_cr_purge/blob/master/retention.sh |
Hi @jeffbeagley, |
Closing this item for now since we could potentially use things like tag locking and - https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auto-purge |
Is a functionality on the roadmap which is able to automatically purge images via some criteria (to be discussed)?
We are quickly approaching some hard limits (500 GB in our case) and need to find a way to clean things up.
Our requirement in the first iteration would be something like: "Keep any manifest marked
latest
, and additionally anything newer than n days."We are considering scripting this (somehow, e.g. in Python or node), but wouldn't bother if you say it's just around the corner. Or, even better, do you know of anybody who has already done something similar?
The data is readily available over the API, as it seems; e.g.
az acr repository show-manifests -n <name> --repository <repo>
returns exactly the kind of data which would be needed to implement such a functionality - each manifest has a list of tags, and additionally atimestamp
.The text was updated successfully, but these errors were encountered: