Docker Container Management
Overview
This document describes the recommended procedure for configuring the GitLab Repository Docker Container Tag Automated Management.
Purpose
The intention is to prevent open-ended and limitless growth of GitLab containers and tags. Unlimited growth has the potential to overuse resources and increase operational costs.
Teams are encouraged to implement this process in their repositories.
Navigate to the GitLab Repository.
Go to Settings→Packages and Registries.

Enable or disable the cleanup scheduler.

Update settings as follows:
- Run cleanup
- Every two weeks.
- Keep Tags Matching:
CRITICAL
Use of the correct regex for the "keep tags matching" is CRITICAL.
- To retain version tags that follow the P1 SemVer format (i.e., nn.nn.nn), use the following regular expression syntax.
[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}
- Remove tags older than:
- 30 days
- Remove tags matching:
- Example:

- Example:
- Run cleanup
Appendix
- Reduction in size of repositories was not evident when enabling cleanup, as no impact will be seen until garbage collection is performed.
- Garbage collection is a function managed by PB-Ops.