mkdir ~/fabric-dev-servers && cd ~/fabric-dev-servers
curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz
tar -xvf fabric-dev-servers.tar.gz
Set version
cd ~/fabric-dev-servers
export FABRIC_VERSION=hlfv12
~/fabric-dev-servers/startFabric.sh
~/fabric-dev-servers/stopFabric.sh
The startFabric.sh removes existing Fabric Containers and recreates new Containers from the Docker Images. You'll lose all your data and your Business Network.
To ensure that you do not lose data you should use docker commands to stop and start the containers:
docker stop $(docker ps -q)
docker start $(docker ps -aq)
Note: This will stop and start all Docker containers. Use docker ps
to find fabric-related containers and than start and stop only thosecontainers.
~/fabric-dev-servers/createPeerAdminCard.sh
composer card list --card <Card Name>
Remove also the Peer Admin card.
~/fabric-dev-servers/teardownFabric.sh