Last active
February 24, 2019 23:50
-
-
Save timothystewart6/b7fd735eb8ed66cde72624fa74142b07 to your computer and use it in GitHub Desktop.
Docker cleanup - crontab
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
#!/bin/bash | |
docker rmi $(docker images -q -f dangling=true) | |
# chmod +x ~/docker-cleanup.sh. | |
# crontab -e | |
# every day at midnight | |
# 0 12 * * * ~/docker-cleanup.sh > /dev/null 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment