Skip to content

Instantly share code, notes, and snippets.

@alexey-igrychev
Created November 1, 2019 21:15
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 alexey-igrychev/86d135a4048cb0067d82ba1b99cdd747 to your computer and use it in GitHub Desktop.
Save alexey-igrychev/86d135a4048cb0067d82ba1b99cdd747 to your computer and use it in GitHub Desktop.
#!/bin/bash
docker exec ${1:-registry} sh -c " \
find /var/lib/registry/docker/registry/v2/repositories/ -type d -maxdepth 1 -mindepth 1 -mtime +1 -exec rm -rf {} \; && \
/entrypoint.sh bin/registry garbage-collect /etc/docker/registry/config.yml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment