mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-25 10:23:42 +01:00
21 lines
477 B
Bash
Executable File
21 lines
477 B
Bash
Executable File
#!/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
|
|
|