Update registry cleaner
This commit is contained in:
parent
43484bbb4b
commit
8f02e4c9aa
2
ansible/gitlab.cred.j2
Normal file
2
ansible/gitlab.cred.j2
Normal file
@ -0,0 +1,2 @@
|
||||
{{ gitlab_username }}
|
||||
{{ gitlab_access_token }}
|
@ -33,3 +33,8 @@ fail2ban_sender:
|
||||
|
||||
# For /etc/hosts
|
||||
domains:
|
||||
|
||||
# Loki setup
|
||||
loki_dir:
|
||||
gitlab_username:
|
||||
gitlab_access_token:
|
||||
|
@ -3,8 +3,6 @@
|
||||
set -e
|
||||
|
||||
CYAN='\033[01;36m'
|
||||
YELLOW='\033[01;33m'
|
||||
RED='\033[01;31m'
|
||||
NC='\033[00m'
|
||||
|
||||
SCRIPT=$(readlink -f $0)
|
||||
@ -17,9 +15,11 @@ DIRNAME=$(dirname $SCRIPT)
|
||||
echo -e "${CYAN}[${SCRIPT}] Soft delete untagged images ${NC}"
|
||||
|
||||
install="pip3 install gitlab-registry-cleanup"
|
||||
cleanup="gitlab-registry-cleanup -g https://gitlab.wojciechkozlowski.eu -r https://registry.wojciechkozlowski.eu -u wojtek"
|
||||
cleanup="gitlab-registry-cleanup -g https://gitlab.wojciechkozlowski.eu -r https://registry.wojciechkozlowski.eu -c /gitlab.cred"
|
||||
|
||||
docker run -it --rm --volumes-from gitlab python bash -c "${install} && ${cleanup}"
|
||||
docker run -it --rm --volumes-from gitlab \
|
||||
-v ${DIRNAME}/gitlab.cred:/gitlab.cred \
|
||||
python bash -c "${install} && ${cleanup}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Garbage collect and hard delete untagged images.
|
||||
|
Reference in New Issue
Block a user