Last active
August 21, 2025 13:39
-
-
Save Kevinrob/4c7f1e5dbf6ce4e94d6ba2bfeff37aeb to your computer and use it in GitHub Desktop.
Revisions
-
Kevinrob revised this gist
Jan 7, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,6 +16,6 @@ for repo in $(echo "${repositories}" | jq -r '.repositories[]'); do done done ``` `kubectl get pods --namespace="container-registry"` `kubectl exec -it --namespace="container-registry" registry-... bash` `bin/registry garbage-collect /etc/docker/registry/config.yml` -
Kevinrob revised this gist
Nov 21, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ ``` registry=localhost:32000 repositories=$(curl ${registry}/v2/_catalog) for repo in $(echo "${repositories}" | jq -r '.repositories[]'); do echo $repo tags=$(curl -sSL "http://${registry}/v2/${repo}/tags/list" | jq -r '.tags[]') -
Kevinrob revised this gist
Nov 21, 2019 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,6 @@ for repo in $(echo "${repositories}" | jq -r '.repositories[]'); do done done ``` `kubectl get pods` `kubectl exec -it --namespace="container-registry" registry-... bash` `bin/registry garbage-collect /etc/docker/registry/config.yml` -
Kevinrob created this gist
Nov 21, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ ``` repositories=$(curl localhost:32000/v2/_catalog) for repo in $(echo "${repositories}" | jq -r '.repositories[]'); do echo $repo tags=$(curl -sSL "http://${registry}/v2/${repo}/tags/list" | jq -r '.tags[]') for tag in $tags; do echo $tag curl -v -sSL -X DELETE "http://${registry}/v2/${repo}/manifests/$( curl -sSL -I \ -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \ "http://${registry}/v2/${repo}/manifests/$tag" \ | awk '$1 == "Docker-Content-Digest:" { print $2 }' \ | tr -d $'\r' \ )" done done ``` `kubectl get pods` `kubectl exec -it --namespace="container-registry" registry-... bash` `bin/registry garbage-collect /etc/docker/registry/config.yml`