Docker commands

When using Docker in development environment, you might need to restart or clean docker containers fully. Here are some helpful commands.

List all containers (only IDs)

docker stop $(docker ps -aq)

Stop all running containers

docker stop $(docker ps -aq)

Remove all containers

docker rm $(docker ps -aq)

Remove all images

docker rmi $(docker images -q)

About the author

Danyal Ali Butt

I'm working as programmer since 2002. Born, grew up, studied and worked in Pakistan now Im located in Denmark since 2006.

View all posts