Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey 2023-02-23 07:00:05 +01:00 committed by GitHub
parent c2444912b8
commit 9e9e991cb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,13 +48,13 @@ while true; do
find "/mnt/docker-aio-config/session/" -mindepth 1 -mmin +1440 -delete
# Remove nextcloud-aio-domaincheck container
docker container remove nextcloud-aio-domaincheck --force
sudo -u www-data docker container remove nextcloud-aio-domaincheck --force
# Remove dangling images
sudo -u www-data docker image prune --force
# Remove dangling volumes
for volume in $(docker volume ls --quiet --filter dangling=true | grep -E "^[a-z0-9]{64}$"); do docker volume remove "$volume"; done
for volume in $(sudo -u www-data docker volume ls --quiet --filter dangling=true | grep -E "^[a-z0-9]{64}$"); do sudo -u www-data docker volume remove "$volume"; done
# Wait 60s so that the whole loop will not be executed again
sleep 60