docker-compose-files/hyperledger_fabric/v0.6.0/setupPbft.sh

33 lines
1.0 KiB
Bash
Raw Normal View History

2016-07-22 18:25:21 +08:00
#! /bin/bash
if [ xroot != x$(whoami) ]
then
echo "You must run as root (Hint: sudo su)"
exit
fi
apt-get update
2016-07-22 18:31:58 +08:00
apt-get install curl -y
2016-07-22 18:25:21 +08:00
wget -qO- https://get.docker.com/ | sh
sudo service docker stop
2016-07-22 18:31:58 +08:00
nohup sudo docker daemon --api-cors-header="*" -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock&
curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
2016-07-22 18:31:58 +08:00
chmod +x /usr/local/bin/docker-compose
docker-compose --version
2016-12-08 17:15:54 +08:00
docker pull yeasy/hyperledger-fabric:0.6-dp \
&& docker pull yeasy/hyperledger-fabric-peer:0.6-dp \
&& docker pull yeasy/hyperledger-fabric-base:0.6-dp \
&& docker pull yeasy/blockchain-explorer:latest \
&& docker tag yeasy/hyperledger-fabric-peer:0.6-dp hyperledger/fabric-peer \
&& docker tag yeasy/hyperledger-fabric-base:0.6-dp hyperledger/fabric-baseimage \
&& docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-membersrvc
2016-07-22 18:31:58 +08:00
2017-05-10 11:56:47 +08:00
cd pbft && docker-compose -f 4-peers.yml up
2016-07-22 18:44:51 +08:00
#test: curl HOST:5000/network/peers