自动化方式
fabric提供了一个shell脚本,执行这个脚本即可自动建立sample环境
https://github.com/hyperledger/fabric/blob/master/scripts/bootstrap.sh
手动方式
- 下载fabric源码
cd $GOPATH/src
mkdir -p github.com/hyperledger
cd github.com/hyperledger
git clone https://github.com/hyperledger/fabric.git
cd src/github.com/hyperledger/fabric
git tag
git checkout -b v1.1.0
下载并切换到tag v1.1.0 版本
- 下载docker images
需要用到的image
hyperledger/fabric-tools
hyperledger/fabric-orderer
hyperledger/fabric-peer
hyperledger/fabric-couchdb
hyperledger/fabric-kafka
hyperledger/fabric-ca
hyperledger/fabric-zookeeper
hyperledger/fabric-baseos
到https://hub.docker.com/u/hyperledger/
找到要下载的image,进入 https://hub.docker.com/r/hyperledger/fabric-peer/tags/
找到跟前一步安装的fabric源码版本一致的tag
docker pull hyperledger/fabric-peer:x86_64-1.1.0
docker pull hyperledger/fabric-tools:x86_64-1.1.0
docker pull hyperledger/fabric-orderer:x86_64-1.1.0
docker pull hyperledger/fabric-couch