Hyperledger Fabric Samples¶
Note
If you are running on Windows you will want to make use of the
Git bash shell
extension for the upcoming terminal commands.
Please visit the Prerequisites if you haven’t previously installed
it.
If you are using Docker Toolbox on Windows 7 or macOS, you
will need to use a location under C:\Users
(Windows 7) or
/Users
(macOS) when installing and running the samples.
If you are using Docker for Mac, you will need to use a location
under /Users
, /Volumes
, /private
, or /tmp
. To use a different
location, please consult the Docker documentation for
file sharing.
If you are using Docker for Windows, please consult the Docker documentation for shared drives and use a location under one of the shared drives.
Determine a location on your machine where you want to place the Hyperledger Fabric samples applications repository and open that in a terminal window. Then, execute the following commands:
git clone https://github.com/hyperledger/fabric-samples.git
cd fabric-samples
Download Platform-specific Binaries¶
Next, we will install the Hyperledger Fabric platform-specific binaries. To do this, execute the following command:
curl -sSL https://goo.gl/PabWJX | bash
The curl command above downloads and executes a bash script that will download and extract all of the platform-specific binaries you will need to set up your network and place them into the cloned repo you created above. It retrieves four platform-specific binaries:
cryptogen
,configtxgen
,configtxlator
, andpeer
and places them in the fabric-samples/bin
directory.
You may want to add that to your PATH environment variable so that these can be picked up without fully qualifying the path to each binary. e.g.:
export PATH=<path to fabric-samples>/bin:$PATH
Finally, the script will download the Hyperledger Fabric docker images from DockerHub into your local Docker registry and tag them as ‘latest’.
The script lists out the docker images installed upon conclusion.
Look at the names for each image; these are the components that will ultimately comprise our Fabric network. You will also notice that you have two instances of the same image ID - one tagged as “x86_64-1.0.0-rc1” and one tagged as “latest”.
Note
Note that on different architectures, the x86_64 would be replaced with the string identifying your architecture.