DEV Community

Discussion on: The Most Useful Docker Commands for Mac You’ve Never Heard of, Because You Need To Make Them

Collapse
 
moopet profile image
Ben Sinclair

I leave docker running all the time and leave my macbook with the lid closed. My workflow is otherwise pretty similar to yours.

I don't think there's any difference between running docker container stop and docker stop, and I can't think of a reason you'd need to attempt to stop containers which aren't running (what the -a gives you), so mine looks like this:

docker stop $(docker ps -q)

I call my version "undock", because I like making it obvious what're official docker commands and what're my additions - I have a very small brain and don't want to get used to expecting subcommands which don't exist on other environments!