Docker Community Forums

Share and learn in the Docker community.

Command line to kill all docker containers on Windows

Command line to kill all docker containers on Windows?

I tried this: https://stackoverflow.com/questions/48813286/stop-all-docker-containers-at-once-on-windows

From Powershell,
PS H:> docker ps -q | % { docker stop _ } e9b285e6989e ad608e613ee7 6a5feef743df 5ec9a6d4d75b 73083eaf145f PS H:\> docker ps -q | % { docker **kill** _ }
f1b7e372673f
3c3ce1c9abdf
3d7ab8cb71ed
a380c780b77e
5b6f3bc724d0
PS H:>

Thing is, the docker containers respawned per instructions in docker-compose.yml “restart_policy”.