Run registry garbage collection
PURPOSE: All documents are provided on this Blog just for educational purposes only. Please make sure that you run it in your test environment before to move on to production environment.
Garbage collection is the process of removing blobs from the File System when they are no longer referenced by a manifest.
# Create a config.yml file as follow.
cd /etc/docker/registry
vi config.yml
version: 0.1storage:
filesystem:
rootdirectory: /storage/registry
# Sample output from a dry run
docker exec -it registry bin/registry garbage-collect --dry-run /etc/docker/registry/config.yml
# Now you can remove items those are eligible for deletion.
docker exec -it registry bin/registry garbage-collect --delete-untagged /etc/docker/registry/config.yml
Your comments are most valuable and it would help me to come up with better posts.