Howto to stop all containers at once in docker

How to stop all containers in docker


Docker is a developer tool which help us to run applications in an isolated environment, where you can start a service, app,local host, MySQL, SQL server, mongodb etc.

Get the container id

To stop container we can use ids of container they, can be , many. First thing we need grab all the ids using the

docker pa -aq

Then use those ids as arguments to stop command as follows

docker stop $(docker ps -aq)

that’s it

Docker posts that may help you

Author: Manoj

Developer and a self-learner, love to work with Reactjs, Angular, Node, Python and C#.Net

Leave a comment

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