Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker Shortcuts
# 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)
# 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