Skip to main content

- Defending Internet Freedom

- IndieHosters

- Give Docker Trainings

- libre.sh, yet another Docker PaaS

- Meteor Freelancer

- ToS;DR

- IndieWeb

- I have something to Hide and you?

- Framasoft

indiehosters.net

github.com/IndiePaaS/IndiePaaS

twitter.com/pierreozoux

github.com/pierreozoux

tosdr.org/

pierre-o.fr

www.humancoders.com/formations/docker

www.meetup.com/Internet-Freedom-Lisbon/

ihavesomethingtohi.de/

framadrive.org

pierre@ozoux.net

Pierre Ozoux

I know how to clean docker!

1 min read

And I can show you!

 

docker rm -v $(docker ps -a -q)

docker rmi $(docker images -q)

docker volume rm $(docker volume ls -qf dangling=true)

 

These commands are dirty, but they are 'safe' as they will do nothing if the ressource is used.

(Don't do it in production though, unless you know what you are doing!)

Inspired from http://container42.com/2014/11/03/docker-indepth-volumes/ and http://jimhoskins.com/2013/07/27/remove-untagged-docker-images.html and also https://github.com/cpuguy83/docker-volumes and http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/