Skip to content

Instantly share code, notes, and snippets.

@benma
Created May 24, 2016 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benma/9a1c38d97b41459528c9c5cb1826ef5f to your computer and use it in GitHub Desktop.
Save benma/9a1c38d97b41459528c9c5cb1826ef5f to your computer and use it in GitHub Desktop.
cleandocker.sh
cleandocker() {
docker rm `docker ps -a | grep Exited | awk '{print $1 }'`
docker rmi `docker images -aq --filter "dangling=true"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment