Last active
January 21, 2023 16:18
-
-
Save thalysonalexr/c092802bd35d6a5bcadef277544a7b42 to your computer and use it in GitHub Desktop.
Cron to prune dangling images and trash of docker
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/sh | |
0 */2 * * * /usr/bin/docker rmi $(docker images -f dangling=true -a -q) && /usr/bin/docker system prune -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment