Docker Tips and Tricks
A collection of useful tips and tricks for Docker.
Delete all containers
NOTE: This will remove ALL your containers.
docker container prune
OR, if you're using an older docker client:
docker rm $(docker ps -a -q)
Delete all untagged containers
docker image prune
OR, if you're using an older docker client:
docker rmi $(docker images | grep '^<none>' | awk '{print $3}')
See all space Docker take up
docker system df
Get IP address of running container
docker inspect [CONTAINER ID] | grep -wm1 IPAddress | cut -d '"' -f 4
Kill all running containers
docker kill $(docker ps -q)