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

@ -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