docker-registry-util
docker-registry-util copied to clipboard
Search and cleanup on Docker Registry v2.
hi, i installed dregutil by pip3 on a centos8 machine in a test-lab. with dregutil i can check my repos and tags, but if i want to delete a repo,...
Instead of initialising full cache with all repositories initialise only requested repos appropriate for next commands: - query-tags - remove-tags
Print tags for query-tags and remove-tags commands example: ``` dregutil query-tags -r myrepo -re .* myrepo sha256:08c5851c58605de87818a417ad20a3bbe03dc249526c3f8045b2bb8f1140e4c7 ['0.0.0'] myrepo sha256:f1cfd5fa6a17517baee325f5764801d3161ed84d6de7080d64e0e1a63d430ebc ['0.0.0-master'] myrepo sha256:839025b393fd35866dc1ba2bc2f081c6c148e1ed6bc52326ce0a6423ead3bd85 ['0.0.0-review', '0.0.0-reviewfinish'] myrepo sha256:deef83c553c8080b835de878f295bb6adfbc143b22ab2026892a33009f89cdc0 ['0.1.0-master'] ```
Repository and tag lists can be paginated: * https://docs.docker.com/registry/spec/api/#pagination * https://docs.docker.com/registry/spec/api/#pagination-1 `requests` exposes this via `response.links`, e.g: ```python url = "https://myregistry/v2/_catalog" while True: response = self.get(url) print(response.url) if "next" in...
V2 registry uses pagination on the `_catalog` endpoint. By default it results ~50 repositories. It can be controlled by query parameter `n`. Such as `docker-registry..com/v2/_catalog?n=1000`. In the existing code this...
Hello! Probably this is feature request Im using externl auth service https://github.com/cesanta/docker_auth And docker-registry-util doesnt work with it :( `dregutil --registry https://myregistry--user admin --password password list-repo-names 2017-12-11 16:44:04,121 [INFO] docker_registry_util.query...