summaryrefslogtreecommitdiffstats
path: root/examples/docker/SRv6_5-node/clean_demo.sh
diff options
context:
space:
mode:
Diffstat (limited to 'examples/docker/SRv6_5-node/clean_demo.sh')
-rwxr-xr-xexamples/docker/SRv6_5-node/clean_demo.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/docker/SRv6_5-node/clean_demo.sh b/examples/docker/SRv6_5-node/clean_demo.sh
new file mode 100755
index 000000000..2e4a8675b
--- /dev/null
+++ b/examples/docker/SRv6_5-node/clean_demo.sh
@@ -0,0 +1,25 @@
+#! /bin/bash
+
+if [[ $UID != 0 ]]; then
+ echo "Please run this script with sudo:"
+ echo "sudo $0 $*"
+ exit 1
+fi
+
+echo "Stopping docker containers:"
+sudo docker stop vppA
+sudo docker stop vppB
+sudo docker stop vppC
+sudo docker stop vppD
+sudo docker stop vppE
+echo "Deleting docker containers:"
+sudo docker rm vppA
+sudo docker rm vppB
+sudo docker rm vppC
+sudo docker rm vppD
+sudo docker rm vppE
+
+echo "Cleaning namespaces."
+sudo ip -all netns delete
+
+echo "Cleanup finished."