Actual TTY fix - don't run docker interactively
This commit is contained in:
parent
7b71fe70cc
commit
bdb0412836
@ -12,14 +12,12 @@ DIRNAME=$(dirname $SCRIPT)
|
|||||||
# Soft delete untagged images.
|
# Soft delete untagged images.
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ -t 1 ]; then
|
echo -e "${CYAN}[${SCRIPT}] Soft delete untagged images ${NC}"
|
||||||
echo -e "${CYAN}[${SCRIPT}] Soft delete untagged images ${NC}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
install="pip3 install gitlab-registry-cleanup"
|
install="pip3 install gitlab-registry-cleanup"
|
||||||
cleanup="gitlab-registry-cleanup -g https://gitlab.wojciechkozlowski.eu -r https://registry.wojciechkozlowski.eu -c /gitlab.cred"
|
cleanup="gitlab-registry-cleanup -g https://gitlab.wojciechkozlowski.eu -r https://registry.wojciechkozlowski.eu -c /gitlab.cred"
|
||||||
|
|
||||||
docker run -it --rm --volumes-from gitlab \
|
docker run --rm --volumes-from gitlab \
|
||||||
-v ${DIRNAME}/gitlab.cred:/gitlab.cred \
|
-v ${DIRNAME}/gitlab.cred:/gitlab.cred \
|
||||||
python bash -c "${install} && ${cleanup}"
|
python bash -c "${install} && ${cleanup}"
|
||||||
|
|
||||||
@ -27,8 +25,6 @@ docker run -it --rm --volumes-from gitlab \
|
|||||||
# Garbage collect and hard delete untagged images.
|
# Garbage collect and hard delete untagged images.
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ -t 1 ]; then
|
echo -e "${CYAN}[${SCRIPT}] Garbage collect untagged images ${NC}"
|
||||||
echo -e "${CYAN}[${SCRIPT}] Garbage collect untagged images ${NC}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker exec gitlab bash -c "gitlab-ctl registry-garbage-collect"
|
docker exec gitlab bash -c "gitlab-ctl registry-garbage-collect"
|
||||||
|
Reference in New Issue
Block a user