Three vital commands every Docker magician should know

Written by KamilTamiola | Published 2017/04/21
Tech Story Tags: docker | devops | productivity-hacks

TLDRvia the TL;DR App

The biggest pain of manual experimentation with Docker builds is an overwhelming number of containers / images you can generate in a very short period of time. Nothing can replace a well designed and automated Docker build system. However, before you get there, I attach the commands, which I believe will save you a lot of time.

Please bare in mind, these commands should be only used on development systems, as they will irreversibly remove all your data.

Delete all containers:

docker rm $(docker ps -a -q)

Delete all images:

docker rmi $(docker images -q)

Force delete all images (even with linked containers):

docker rmi $(docker images -q) --force

Useful post? If so, make my day by clicking the heart below!

About the Author

Kamil Tamiola is the founder and the architect of Peptone — The Protein Intelligence Company. You can connect with him on AngelList, LinkedIn, Twitter, and Researchgate.


Published by HackerNoon on 2017/04/21