Manage repositories of a private docker registry
- list repositories
- list tags of a repository
- delete tags of repository
cp .env.template .env
vi .env
docker run --rm -it -v /path/to/.env:/app/.env registry-curator
This tool only issues HTTP commands to a docker registry. In order to really delete physical files and free disk space a garbage collection must be run.
Here's an example running garbage collection of a registry running in a kubernetes cluster:
# get the name of the pod
PODNAME=`kubectl get pods --no-headers -o custom-columns=":metadata.name" -l 'app=registry'`
# dry-run to preview execution
kubectl exec $PODNAME -- registry garbage-collect --dry-run /etc/config.yml
# issue garbage collection
kubectl exec $PODNAME -- registry garbage-collect /etc/config.yml