Manually starting hyperledger peers using docker images
<p>The <a href="https://github.com/hyperledger/fabric" rel="nofollow">hyperledger project</a> has a built-in docker image definition for running peer nodes. Given the vagrant focused development environment documentation, it's not immediately obvious that you can set up your own chain network using docker-compose.</p>

<p>To do that, first build the docker image by running this test (this test step is entirely dedicated to building the image): </p>

<pre><code>go test github.com/hyperledger/fabric/core/container -run=BuildImage_Peer
</code></pre>

<p>Once the image is built, use docker-compose to launch the peer nodes. This folder has some pre-built yaml files for docker-compose:</p>

<pre><code>github.com/hyperledger/fabric/bddtests
</code></pre>

<p>Use the following command to launch 3 peers (for instance):</p>

<pre><code> docker-compose -f docker-compose-3.yml up --force-recreate -d
</code></pre>

<p>After the container instances are up, use <code>docker inspect</code> to get the IP addresses and use port <code>5000</code> to call the REST APIs (refer to the documentation for REST API spec).</p>