Avoid to clear unrelated containers

This commit is contained in:
Yushan Lu 2018-04-22 18:17:46 -04:00
parent f05a132586
commit 741bf979a2

View file

@ -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