33 lines
1.0 KiB
Bash
33 lines
1.0 KiB
Bash
#! /bin/bash
|
|
|
|
|
|
if [ xroot != x$(whoami) ]
|
|
then
|
|
echo "You must run as root (Hint: sudo su)"
|
|
exit
|
|
fi
|
|
|
|
apt-get update
|
|
|
|
apt-get install curl -y
|
|
|
|
wget -qO- https://get.docker.com/ | sh
|
|
sudo service docker stop
|
|
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
|
|
chmod +x /usr/local/bin/docker-compose
|
|
docker-compose --version
|
|
|
|
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
|
|
|
|
cd pbft && docker-compose -f 4-peers.yml up
|
|
|
|
#test: curl HOST:5000/network/peers
|