Created
October 14, 2015 02:51
-
-
Save elleryq/bc07ccd8451def7a5b57 to your computer and use it in GitHub Desktop.
docker - remove container which status is exited
This file contains hidden or 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 | |
# Refer https://docs.docker.com/reference/commandline/ps/ to get more usage about filter(-f). | |
docker ps -f "status=exited" -q | xargs docker rm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment