EN
Docker - stop all containers
4
points
In this short article we would like to show how to stop all run containers in Docker.
Quick solution (run following command):
docker stop $(docker ps -aq)
Output:
d76423e8e259
f44b6ffcee6a
25605bf8dc3f
c14692b929b2
8867d0ac1ed1
252ab6485893
Alternative solutions
We can iterate over all ids and send TERM signal.
for i in $(docker ps -q); do docker kill $i; done;