fabric-samples/fabric-ca/bootstrap.sh
Saad Karim 77e74b7cd7 [FAB-8497] Download images required for fabric-ca
Added a script for fabric-ca sample that downloads
all the required docker images.

Vendored dependencies for the fabric-ca sample chaincode.
It can now be run without having a local fabric repository.

Change-Id: I7e0f3d7950201e42fdf82bbef2fc855d33c78676
Signed-off-by: Saad Karim <skarim@us.ibm.com>
2018-02-27 20:35:34 +00:00

30 lines
868 B
Bash
Executable file

#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# current version of fabric-ca released
export CA_VERSION=${1:-1.1.0}
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`
dockerCaPull() {
local CA_TAG=$1
echo "==> FABRIC CA IMAGE"
echo
for image in "" "-tools" "-orderer" "-peer"; do
docker pull hyperledger/fabric-ca${image}:$CA_TAG
docker tag hyperledger/fabric-ca${image}:$CA_TAG hyperledger/fabric-ca${image}
done
}
: ${CA_TAG:="$MARCH-$CA_VERSION"}
echo "===> Pulling fabric ca Image"
dockerCaPull ${CA_TAG}
echo "===> List out hyperledger docker images"
docker images | grep hyperledger*