How To Stop All Docker Containers

Have you ever wanted to stop all Docker containers running on your machine? Well, today is your lucky day!

The following command is all you need to stop all containers!

docker stop $(docker ps -aq)

That’s it! That will stop them all and you can do whatever you need to do. Want to start them all back up again? There’s a similar command below that will take care of that for you.

docker start $(docker ps -aq)

Just a quick, but useful post this time around. I’ll catch you in the next one.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.