d-tork / ansible

Ansible configurations
0 stars 0 forks source link

Keep docker caches clean #2

Open d-tork opened 2 years ago

d-tork commented 2 years ago

An enormous drain on storage is often dangling/unused docker images and volumes. To clear this out, use a variety of pruneing methods, but ultimately this was the only one that truly worked for me on Sizemore:

docker system prune -a
d-tork commented 1 year ago

One of the facts Ansible can check is free disk space on each partition. There should be a task or play that runs with a regular update playbook which, on the condition of having X% free space, cleans docker caches, apt cache, etc.