Regbroom tool cleans up Docker Registry image tags by specified release (e.g. X.Y.Z) and development version (e.g. X.Y.Z-bla.1) patterns keeping only specified amount of the most recently published tags.
Dev version tag keep logic is the following: keep specified in the config amount of dev tags per kept release tag (substring match) OR just keep specified amount of dev tags from the whole list of tags matching dev pattern if no release tags found and force flag is specified in the repo config.
IMPORTANT Tool relies on 'last updated' sorting of the Docker Registry API, thus Regbroom might not work as you expect if your Registry API sorts the list of tags differently. For example Docker HUB API seems to sort in lexicographic order which won't be suitable for the Regbroom
Prepare Regbroom config.yaml (see details in the Configuration section) and then run:
docker run --rm \
-v /path/to/regbroom/config.yaml:/root/.config/regbroom/config.yaml
vi7al/regbroom
See config_local.yaml for options description and some handy configuration examples. The same file is present in the Docker image at /root/.config/regbroom/config_example.yaml
Dockerized Regbroom
By default Regbroom Docker image comes with the example of insecure registries config for the regctl tool. This could be found in the docker/regctl_config.json
If you need to tell regctl to not use HTTPS for some other real registries this could be achieved via following ways:
config.json using regctl registry set <registry> --tls disabled and mount this custom config as an additional volume:
docker run --rm \
-v /etc/regbroom:/root/.config/regbroom \ # Regbroom config volume
-v "$HOME"/.regctl/config.json:/root/.regctl/config.json \ # custom regctl config.json
vi7al/regbroom
Go to the repo and change whatever is needed
Bump the version in the ci/build.env
Create Merge Request and add maintainers from Dockerfile as reviewers
After MR is reviewed, checked by CI and merged to the master run:
git checkout master && git pull --rebase
make git-tag git-push
CI will be triggered automatically now and release Docker image to the Registry
Run
make helpto see all the available tasks
Content type
Image
Digest
Size
24.9 MB
Last updated
almost 5 years ago
docker pull vi7al/regbroom