fixed bug in cronjob script files: volume prune was in dangling-images and system prune in dangling volumes. Raised volume prune cronjob to every 12 hours #4
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# "system" prune, because pruning images only leaves a lot of garbage around
|
# "system" prune, because pruning images only leaves a lot of garbage around
|
||||||
docker volume prune --force > /var/log/docker-volume-prune.log 2>&1
|
docker system prune --force >> /var/log/docker-system-prune.log 2>&1
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# "system" prune, because pruning images only leaves a lot of garbage around
|
# "system" prune, because pruning images only leaves a lot of garbage around
|
||||||
docker system prune --force > /var/log/docker-prune.log 2>&1
|
docker volume prune --force > /var/log/docker-volumes-prune.log 2>&1
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,8 @@
|
||||||
cron:
|
cron:
|
||||||
name: Prune docker volumes
|
name: Prune docker volumes
|
||||||
cron_file: docker-prune-volumes
|
cron_file: docker-prune-volumes
|
||||||
special_time: daily
|
minute: "0"
|
||||||
|
hours: "*/12"
|
||||||
user: root
|
user: root
|
||||||
state: present
|
state: present
|
||||||
job: "/usr/local/sbin/docker-prune-dangling-volumes"
|
job: "/usr/local/sbin/docker-prune-dangling-volumes"
|
||||||
|
|
@ -130,7 +131,8 @@
|
||||||
cron:
|
cron:
|
||||||
name: Prune docker volumes
|
name: Prune docker volumes
|
||||||
cron_file: docker-prune-volumes
|
cron_file: docker-prune-volumes
|
||||||
special_time: daily
|
minute: "0"
|
||||||
|
hours: "*/12"
|
||||||
user: root
|
user: root
|
||||||
state: absent
|
state: absent
|
||||||
job: "/usr/local/sbin/docker-prune-dangling-volumes"
|
job: "/usr/local/sbin/docker-prune-dangling-volumes"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue