Skip to content

Instantly share code, notes, and snippets.

@manit77
Last active December 12, 2023 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manit77/42265ac5e7f8858d656c6e47e5217f61 to your computer and use it in GitHub Desktop.
Save manit77/42265ac5e7f8858d656c6e47e5217f61 to your computer and use it in GitHub Desktop.
private docker delete image file from disk
When you delete a tag from docker a private registry, it doesn't delete the image file from disk without running garbage collection.
# docker swarm
docker exec $(docker ps -q -f name=registry_registry-server) registry garbage-collect /etc/docker/registry/config.yml --delete-untagged
# docker local
docker exec <registry_container_name> registry garbage-collect /etc/docker/registry/config.yml --delete-untagged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment