I have multiple docker (version 18.09.0, build 4d60db4) containers running and I wish to stop them all at once. This blog post shows concisely exactly how to achieve this, g
In your Windows shell, you can do:
FOR /f "tokens=*" %i IN ('docker ps -q') DO docker stop %i
Taken from other question: Stop all docker containers at once on Windows
You can also run your command - docker stop $(docker ps -aq)
in PowerShell or GitBash; I would think it is because the $(docker ps -aq)
part of the command is Linux command.