Jeggs101 Well-Known Member Dec 29, 2010 1,529 241 63 Oct 11, 2017 #1 What's the best method you've found to stop all docker containers on a host. I tried making consistent names but that's not what I want.
What's the best method you've found to stop all docker containers on a host. I tried making consistent names but that's not what I want.
Patrick Administrator Staff member Dec 21, 2010 12,511 5,792 113 Oct 11, 2017 #2 Code: docker stop $(docker ps -q) You need the -q flag so it does not print header output and try to stop containers based on that header.
Code: docker stop $(docker ps -q) You need the -q flag so it does not print header output and try to stop containers based on that header.