mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-01 08:33:06 +01:00
21 lines
477 B
Plaintext
21 lines
477 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
# registry-gc
|
||
|
# description: run garbage collection on registry
|
||
|
# name: registry
|
||
|
|
||
|
set -eu
|
||
|
|
||
|
if ! sudo podman container exists registry; then
|
||
|
echo "registry container does not exist"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if sudo podman container exec -it registry bin/registry garbage-collect /etc/docker/registry/config.yml -m; then
|
||
|
echo "Registry garbage collection ran successfully"
|
||
|
exit 0
|
||
|
else
|
||
|
echo "Error running registry garbage collection"
|
||
|
exit 1
|
||
|
fi
|
||
|
|