#下载bootstrap.sh
git clone https://gitee.com/real__cool/fabric_install
#下载工具文件
./bootstrap3.sh 1.4.4 1.4.4 -s
#创建 .env file
COMPOSE_PROJECT_NAME=net
IMAGE_TAG=latest
SYS_CHANNEL=byfn-sys-channel
#生成证书材料
./bin/cryptogen generate --config=./crypto-config.yaml
#创建通道相关资料文件夹
mkdir channel-artifacts
#生成创世区块
./bin/configtxgen -profile TwoOrgsOrdererGenesis -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block
#生成通道配置
./bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID mychannel
#生成锚节点配置
./bin/configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP
#生成锚节点配置
./bin/configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID mychannel -asOrg Org2MSP
#启动网络
docker-compose -f docker-compose-cli.yaml up -d
#查看当前容器
docker ps
#复制链码到../chaincode
#进入cli容器
docker exec -it cli bash
#设置环境变量
peer0org1="CORE_PEER_LOCALMSPID="Org1MSP" CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/#下载bootstrap.sh
git clone https://gitee.com/