Merge pull request #63 from nextcloud/enh/26/run-image-and-volume-prune

run image prune and volume prune regularly
This commit is contained in:
Simon L 2021-12-15 13:10:46 +01:00 committed by GitHub
commit 5723bf7ea8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -26,6 +26,9 @@ RUN curl "https://caddyserver.com/api/download?os=linux&arch=amd64" -o "/usr/bin
&& chmod +x /usr/bin/caddy \
&& /usr/bin/caddy version
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
RUN chmod +x /usr/local/bin/docker
RUN cd /var/www/docker-aio; \
git clone https://github.com/nextcloud/all-in-one.git .; \
chmod 770 -R ./; \

View file

@ -1,7 +1,10 @@
#!/bin/sh
set -eu
set -eux
while true; do
# Check for updates and send notification if yes
sudo -u www-data php /var/www/docker-aio/php/src/Cron/cron.php
# Remove dangling images
sudo -u www-data docker image prune -f
sleep 1d
done