/ registry_gc
registry_gc
1 #!/usr/bin/env bash 2 # registry-gc 3 # description: run garbage collection on registry 4 # name: registry 5 6 set -eu 7 8 if ! sudo podman container exists registry; then 9 echo "registry container does not exist" 10 exit 1 11 fi 12 13 if sudo podman container exec -it registry bin/registry garbage-collect /etc/docker/registry/config.yml -m; then 14 echo "Registry garbage collection ran successfully" 15 exit 0 16 else 17 echo "Error running registry garbage collection" 18 exit 1 19 fi 20