Skip to content

Instantly share code, notes, and snippets.

@alexwilson
Created August 6, 2016 20:12
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 alexwilson/d60fad73f984986c119a5c6ee6b486fe to your computer and use it in GitHub Desktop.
Save alexwilson/d60fad73f984986c119a5c6ee6b486fe to your computer and use it in GitHub Desktop.
Docker cleanup
#!/bin/sh
# Sourced from https://github.com/jfrazelle/dotfiles/blob/a7fd3df6ab423e6dd04f27727f653753453db837/.dockerfunc#L8-L11
docker rm -v $(docker ps --filter status=exited -q 2>/dev/null) 2>/dev/null
docker rmi $(docker images --filter dangling=true -q 2>/dev/null) 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment