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
|
|
|
|
|
2016-08-10 18:38:34 +08:00
|
|
|
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&
|
|
|
|
|
2016-08-10 18:38:34 +08:00
|
|
|
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-10-16 08:46:52 +08:00
|
|
|
docker pull yeasy/hyperledger-fabric:0.6-dp \
|
|
|
|
&& docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-peer:latest \
|
|
|
|
&& docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-baseimage:latest \
|
|
|
|
&& docker tag yeasy/hyperledger-fabric:0.6-dp hyperledger/fabric-membersrvc:latest
|
2016-07-22 18:31:58 +08:00
|
|
|
|
|
|
|
cd pbft
|
|
|
|
docker-compose up
|
2016-07-22 18:44:51 +08:00
|
|
|
|
|
|
|
#test: curl HOST:5000/network/peers
|