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

Automated deletion for images in the container registry #20514

Closed
loadi-dev opened this issue Jul 28, 2022 · 2 comments · Fixed by #21658
Closed

Automated deletion for images in the container registry #20514

loadi-dev opened this issue Jul 28, 2022 · 2 comments · Fixed by #21658
Labels
topic/packages type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@loadi-dev
Copy link

Feature Description

I'm heavily using the package registry introduced with Gitea 1.17 (using 1.17.0+rc2 at the moment). I'm especially generating docker images quite frequently. This starts to consume lots of space on my hard disk.

It would be nice, if Gitea would have the possibility to automatically delete packages (especially container images) after a configurable time. The configuration could come from the linked repository.

Gitlab has a similar feature allowing to configure a time to keep images (e.g. at least 2 weeks) and the amount of images to keep (e.g. keep the last 5 images). So only if both conditions were exceeded it would delete the images.

Alternatively it would already be helpful to allow bulk deletion using a checkbox in the packages list. Right now I need a lot of clicks to delete old packages (6 per container image starting on the packages overview list). And every time I delete one old image I'm back on the packages overview site.

Screenshots

No response

@loadi-dev loadi-dev added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Jul 28, 2022
@KN4CK3R
Copy link
Member

KN4CK3R commented Aug 11, 2022

related #20766

@KN4CK3R
Copy link
Member

KN4CK3R commented Nov 2, 2022

Implemented this in #21658.

lafriks pushed a commit that referenced this issue Nov 20, 2022
Fixes #20514
Fixes #20766
Fixes #20631

This PR adds Cleanup Rules for the package registry. This allows to
delete unneeded packages automatically. Cleanup rules can be set up from
the user or org settings.
Please have a look at the documentation because I'm not a native english
speaker.

Rule Form

![grafik](https://user-images.githubusercontent.com/1666336/199330792-c13918a6-e196-4e71-9f53-18554515edca.png)

Rule List

![grafik](https://user-images.githubusercontent.com/1666336/199331261-5f6878e8-a80c-4985-800d-ebb3524b1a8d.png)

Rule Preview

![grafik](https://user-images.githubusercontent.com/1666336/199330917-c95e4017-cf64-4142-a3e4-af18c4f127c3.png)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
fsologureng pushed a commit to fsologureng/gitea that referenced this issue Nov 22, 2022
Fixes go-gitea#20514
Fixes go-gitea#20766
Fixes go-gitea#20631

This PR adds Cleanup Rules for the package registry. This allows to
delete unneeded packages automatically. Cleanup rules can be set up from
the user or org settings.
Please have a look at the documentation because I'm not a native english
speaker.

Rule Form

![grafik](https://user-images.githubusercontent.com/1666336/199330792-c13918a6-e196-4e71-9f53-18554515edca.png)

Rule List

![grafik](https://user-images.githubusercontent.com/1666336/199331261-5f6878e8-a80c-4985-800d-ebb3524b1a8d.png)

Rule Preview

![grafik](https://user-images.githubusercontent.com/1666336/199330917-c95e4017-cf64-4142-a3e4-af18c4f127c3.png)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/packages type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants