Created
December 12, 2019 00:48
-
-
Save shsteven/8ec540fe710748a53913a48b6ff9538a to your computer and use it in GitHub Desktop.
Cron job to purge docker images every day at 1am, if disk usage is over 80%
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 1 * * * df -Ph / | grep root | awk '{ if($5 > 80) print $0;}' | docker image prune -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment