Browse Source

added script to stop all running container, usefull when swithching between projects

Martino Massalini 3 years ago
parent
commit
748f4c7126
1 changed files with 8 additions and 0 deletions
  1. 8 0
      compose/bin/stopall

+ 8 - 0
compose/bin/stopall

@@ -0,0 +1,8 @@
+#!/bin/bash
+if [ -z "$(docker ps -q)" ]
+then
+    echo "You have no running container"
+else
+    echo "Stopping all running containers"
+    docker stop $(docker ps -q)
+fi