docker-compose-files/hyperledger_fabric/v1.0.0/scripts/download_images.sh

48 lines
1.9 KiB
Bash
Raw Normal View History

2017-05-12 13:42:40 +08:00
#!/usr/bin/env bash
2017-07-10 17:24:19 +08:00
# Detecting whether can import the header file to render colorful cli output
if [ -f ./header.sh ]; then
source ./header.sh
2017-07-12 11:52:27 +08:00
elif [ -f scripts/header.sh ]; then
2017-07-10 17:24:19 +08:00
source scripts/header.sh
else
alias echo_r="echo"
alias echo_g="echo"
alias echo_b="echo"
fi
2017-05-10 11:56:47 +08:00
ARCH=x86_64
2017-06-08 11:44:31 +08:00
BASEIMAGE_RELEASE=0.3.1
BASE_VERSION=1.0.0
2017-07-12 11:52:27 +08:00
PROJECT_VERSION=1.0.0
2017-05-10 11:56:47 +08:00
2017-07-12 11:52:27 +08:00
# For testing 1.0.0 images
2017-08-22 21:58:46 +08:00
IMG_TAG=1.0.0
2017-06-07 15:53:15 +08:00
echo_b "Downloading images from DockerHub... need a while"
2017-05-10 11:56:47 +08:00
2017-06-08 11:44:31 +08:00
# TODO: we may need some checking on pulling result?
2017-08-22 21:58:46 +08:00
docker pull yeasy/hyperledger-fabric-base:$IMG_TAG \
&& docker pull yeasy/hyperledger-fabric-peer:$IMG_TAG \
&& docker pull yeasy/hyperledger-fabric-orderer:$IMG_TAG \
&& docker pull yeasy/hyperledger-fabric-ca:$IMG_TAG \
&& docker pull hyperledger/fabric-couchdb:$ARCH-$IMG_TAG \
&& docker pull hyperledger/fabric-kafka:$ARCH-$IMG_TAG \
&& docker pull hyperledger/fabric-zookeeper:$ARCH-$IMG_TAG
2017-05-10 11:56:47 +08:00
# Only useful for debugging
# docker pull yeasy/hyperledger-fabric
2017-05-12 13:42:40 +08:00
echo_b "Rename images with official tags..."
2017-08-22 21:58:46 +08:00
docker tag yeasy/hyperledger-fabric-peer:$IMG_TAG hyperledger/fabric-peer \
&& docker tag yeasy/hyperledger-fabric-peer:$IMG_TAG hyperledger/fabric-tools \
&& docker tag yeasy/hyperledger-fabric-orderer:$IMG_TAG hyperledger/fabric-orderer \
&& docker tag yeasy/hyperledger-fabric-ca:$IMG_TAG hyperledger/fabric-ca \
&& docker tag yeasy/hyperledger-fabric-base:$IMG_TAG hyperledger/fabric-ccenv:$ARCH-$PROJECT_VERSION \
&& docker tag yeasy/hyperledger-fabric-base:$IMG_TAG hyperledger/fabric-baseos:$ARCH-$BASEIMAGE_RELEASE \
&& docker tag yeasy/hyperledger-fabric-base:$IMG_TAG hyperledger/fabric-baseimage:$ARCH-$BASEIMAGE_RELEASE \
&& docker tag hyperledger/fabric-zookeeper:$ARCH-$IMG_TAG hyperledger/fabric-zookeeper \
&& docker tag hyperledger/fabric-kafka:$ARCH-$IMG_TAG hyperledger/fabric-kafka
2017-06-07 15:53:15 +08:00
2017-06-26 11:23:59 +08:00
echo_g "Done, now can startup the network using docker-compose..."