summaryrefslogtreecommitdiffstats
path: root/examples/docker/remove_all_containers.sh
diff options
context:
space:
mode:
Diffstat (limited to 'examples/docker/remove_all_containers.sh')
-rwxr-xr-xexamples/docker/remove_all_containers.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/docker/remove_all_containers.sh b/examples/docker/remove_all_containers.sh
new file mode 100755
index 000000000..7327f91e6
--- /dev/null
+++ b/examples/docker/remove_all_containers.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+ids=$(docker ps -aq)
+
+# Stop all containers
+docker stop $ids
+
+# Delete all containers
+docker rm $ids