From c3586bcf022d37a58d2a2138287e027f86d3b314 Mon Sep 17 00:00:00 2001 From: hag3 Date: Tue, 11 Dec 2018 12:18:07 +0800 Subject: [PATCH] Add filtering function to the dkcl function (DCO) The original dkcl function deletes all containers regardless of whether they were started by this sample or not (e.g. rancher/agent). Doing so would corrupt the host's environment and cause inconvenience. So I added conditional filtering to the dkfc function. Signed-off-by: Hag hag3@21cn.com --- balance-transfer/runApp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/balance-transfer/runApp.sh b/balance-transfer/runApp.sh index 141b3411..8154e8b2 100755 --- a/balance-transfer/runApp.sh +++ b/balance-transfer/runApp.sh @@ -6,7 +6,7 @@ # function dkcl(){ - CONTAINER_IDS=$(docker ps -a | grep "ca_peerOrg\|.example.com" | awk '{print $1}') + CONTAINER_IDS=$(docker ps -a | grep "ca_peerOrg\|example.com" | awk '{print $1}') echo if [ -z "$CONTAINER_IDS" -o "$CONTAINER_IDS" = " " ]; then echo "========== No containers available for deletion =========="