Handy Docker commands
Commands you need when you test a docker image or build a lot of them and you see some dead images floating taking up space in your system.
Commands
Kill all running docker containers
docker rm -f $(docker ps -a -q)
See dangling docker containers
docker images -q --filter "dangling=true"
Remove untagged docker images
docker rmi -f `docker images -q --filter "dangling=true"`
Bash aliases
Save them one single file and run simple commands, for example:
docker.remove-untagged-images
When you use these aliases make sure you enable them in your.profile
xor.bashrc