Sfoglia il codice sorgente

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

Martino Massalini 4 anni fa
parent
commit
748f4c7126
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  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