From 2c0c2c7459b8c2de7fdd21dd8a43151e52a332f1 Mon Sep 17 00:00:00 2001 From: Latitia M Haskins Date: Thu, 25 Jan 2018 12:05:33 -0500 Subject: [PATCH] [FAB-7910] Clean up chaincode containers in fabric-ca The stop.sh script cleans up the network and service containers from the composition file, but does not clean up the resulting chaincode containers. This CR removes the chaincode containers and their images as well. Change-Id: I06ba13486efc59b4761728891aab27535ae0366d Signed-off-by: Latitia M Haskins --- fabric-ca/stop.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fabric-ca/stop.sh b/fabric-ca/stop.sh index c350e46faf..8f854060a0 100755 --- a/fabric-ca/stop.sh +++ b/fabric-ca/stop.sh @@ -11,4 +11,7 @@ source $SDIR/scripts/env.sh log "Stopping docker containers ..." docker-compose down +# Stop chaincode containers and images as well +docker rm -f $(docker ps -aq --filter name=dev-peer) +docker rmi $(docker images | awk '$1 ~ /dev-peer/ { print $3 }') log "Docker containers have been stopped"