Created
December 1, 2016 12:59
-
-
Save elmariofredo/74d84a2ea490ec0f18c669c2d6d0306b to your computer and use it in GitHub Desktop.
Clean all default containers older than two hours
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 ps -a | grep 'hours ago' | awk '{print $1}' | xargs --no-run-if-empty docker rm -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment