docker-compose-files/hyperledger_fabric/v1.4.7/scripts/env_cleanup.sh

17 lines
491 B
Bash
Raw Permalink Normal View History

2020-05-21 02:24:13 +08:00
#!/usr/bin/env bash
# This script will remove all containers and hyperledger related images
echo "Clean up all containers..."
docker rm -f `docker ps -qa`
echo "Clean up all chaincode images..."
docker rmi -f $(docker images |grep 'dev-peer'|awk '{print $3}')
echo "Clean up all hyperledger related images..."
docker rmi -f $(docker images |grep 'hyperledger'|awk '{print $3}')
echo "Clean up dangling images..."
docker rmi $(docker images -q -f dangling=true)
echo "Env cleanup done!"