From 741bf979a2c7ca1d284b38ee40192ce4e63dd3cc Mon Sep 17 00:00:00 2001 From: Yushan Lu Date: Sun, 22 Apr 2018 18:17:46 -0400 Subject: [PATCH] Avoid to clear unrelated containers --- first-network/byfn.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/first-network/byfn.sh b/first-network/byfn.sh index df17cc33..80b7bade 100755 --- a/first-network/byfn.sh +++ b/first-network/byfn.sh @@ -85,9 +85,8 @@ function askProceed () { } # Obtain CONTAINER_IDS and remove them -# TODO Might want to make this optional - could clear other containers function clearContainers () { - CONTAINER_IDS=$(docker ps -aq) + CONTAINER_IDS=$(docker ps --filter "name=^/dev-peer|^/peer|^/orderer|cli" -aq) if [ -z "$CONTAINER_IDS" -o "$CONTAINER_IDS" == " " ]; then echo "---- No containers available for deletion ----" else