Docker Tips and Tricks

Docker Tips and Tricks

A collection of useful tips and tricks for Docker.

Delete all containers

NOTE:This will remove ALL your containers.

docker rm $(docker ps -a -q)

Delete all untagged containers

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)