Skip to content

Instantly share code, notes, and snippets.

@toast38coza
Created February 8, 2016 20:46
Show Gist options
  • Save toast38coza/2237bd82af8b2140a3df to your computer and use it in GitHub Desktop.
Save toast38coza/2237bd82af8b2140a3df to your computer and use it in GitHub Desktop.
Some commands for cleaning up after Docker
# hat-tip: http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/
# cleanup docker:
docker rm -v $(docker ps -a -q -f status=exited)
docker rmi $(docker images -f "dangling=true" -q)
docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment