Last active
February 7, 2018 19:57
-
-
Save l3acucm/25d7d548c359ac80076b78948799b889 to your computer and use it in GitHub Desktop.
Get actual hyperledger fabric images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Copyright IBM Corp. All Rights Reserved. | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # | |
| # source: https://raw.githubusercontent.com/hyperledger/fabric/v1.0.5/scripts/bootstrap.sh | |
| # current version of fabric released | |
| # TODO: replace with latest version of fabric! | |
| export VERSION=${1:-1.0.5} | |
| # current version of fabric-ca released | |
| export CA_VERSION=${2:-$VERSION} | |
| export ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}') | |
| #Set MARCH variable i.e ppc64le,s390x,x86_64,i386 | |
| MARCH=`uname -m` | |
| dockerFabricPull() { | |
| local FABRIC_TAG=$1 | |
| for IMAGES in peer orderer couchdb ccenv javaenv kafka zookeeper tools; do | |
| echo "==> FABRIC IMAGE: $IMAGES" | |
| echo | |
| docker pull hyperledger/fabric-$IMAGES:$FABRIC_TAG | |
| docker tag hyperledger/fabric-$IMAGES:$FABRIC_TAG hyperledger/fabric-$IMAGES | |
| done | |
| } | |
| dockerCaPull() { | |
| local CA_TAG=$1 | |
| echo "==> FABRIC CA IMAGE" | |
| echo | |
| docker pull hyperledger/fabric-ca:$CA_TAG | |
| docker tag hyperledger/fabric-ca:$CA_TAG hyperledger/fabric-ca | |
| } | |
| : ${CA_TAG:="$MARCH-$CA_VERSION"} | |
| : ${FABRIC_TAG:="$MARCH-$VERSION"} | |
| echo "===> Downloading platform binaries" | |
| curl https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/${ARCH}-${VERSION}/hyperledger-fabric-${ARCH}-${VERSION}.tar.gz | tar xz | |
| echo "===> Pulling fabric Images" | |
| dockerFabricPull ${FABRIC_TAG} | |
| echo "===> Pulling fabric ca Image" | |
| dockerCaPull ${CA_TAG} | |
| echo | |
| echo "===> List out hyperledger docker images" | |
| docker images | grep hyperledger* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment