Docker Container Management
Summary
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 over-use resources and increase operation 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.
- In order to retain version tags that follow the Platform One 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:
- For 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 Partybus OPS: https://docs.gitlab.com/ee/administration/packages/container_registry.html#container-registry-garbage-collection