Last active
May 14, 2017 23:50
-
-
Save sshadmand/a56630016d42f6b5a63bda09d9598308 to your computer and use it in GitHub Desktop.
Docker Shortcuts
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
# This works becuase tagless images look like this: | |
# | |
# REPOSITORY TAG IMAGE ID CREATED SIZE | |
# <none> <none> 39c3774dd2fb 10 minutes ago 417 MB | |
docker rmi $(docker images -a | grep none) |
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
# Get hash of first column and reverse grep containers called "fake" | |
docker rm $(docker ps -a | grep -v fake | awk '{print $1}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment