run image prune and volume prune regularly

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2021-12-07 18:35:18 +01:00
parent 3a67636092
commit 4174e39f2b
2 changed files with 6 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,9 @@
#!/bin/sh
set -eu
set -eux
while true; do
sudo -u www-data php /var/www/docker-aio/php/src/Cron/cron.php
sudo -u www-data docker image prune -f
sudo -u www-data docker volume prune -f
sleep 1d
done