Most used docker commands

less than 1 minute read

Some most used commands for docker

Stop all docker containers

docker stop $(docker ps -a -q)

Remove all docker containers

docker rm $(docker ps -a -q)

Remove all docker images

docker rmi $(docker images -q)

Deleting no longer needed containers (stopped)

docker container prune

Deleting no longer needed images

docker image prune

Delete all volumes, which are not used by any existing container

docker volume prune

Same for unused networks

docker network prune

Comments