Created
August 18, 2016 10:46
-
-
Save nanlabsweb/2f4d1b4c8e8ba3954377d61bea589c0a to your computer and use it in GitHub Desktop.
POST - Docker useful commands.
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
# remove all containers | |
sudo docker rm $(sudo docker ps -a -q) | |
# view last container | |
sudo docker ps -l | |
# remove all non-running containers | |
sudo docker ps -a | grep Exited | awk '{ print $NF }' | xargs sudo docker rm | |
# remove image containing TERM | |
sudo docker rmi $(sudo docker images | grep TERM | awk '{ print $3 }') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment