Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 749 Bytes

TipsAndTricks.md

File metadata and controls

49 lines (32 loc) · 749 Bytes

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)

Got more tips and tricks? Submit a PR!