Explorar el Código

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

Martino Massalini hace 4 años
padre
commit
748f4c7126
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  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