- Hyperledger Cookbook
- Xun (Brian) Wu Chuanfeng Zhang Andrew Zhang
- 282字
- 2021-06-24 14:59:40
How it works...
Here, we deployed the chaincode to the peer node. Let's now take a look at how chaincode-docker-devmode defines the blockchain configuration. chaincode-docker-devmode has some predefined configuration files and scripts. Here are the files in chaincode-docker-devmode:

Let's take a closer look at the docker-compose-simple.yaml file:
- This file defines services, peer, cli, and chaincode container configuration.
- Services define the orderer service with the container name as port 7050. It points to the Docker image at hyperledger/fabric-orderer.
- Peer defines a peer node. The peer container port is 7051. It points to a Docker image at hyperledger/fabric-peer.
- The cli section defines the cli container name as cli. The cli container can issue a command to interact with the chaincode deployed in the peer node. It points to a Docker image at hyperledger/fabric-tools.
- The chaincode container defines the container name as chaincode. It points to a Docker image at hyperledger/fabric-ccenv.
Here is the screenshot we see after we bring up the Docker containers. We can see the previously mentioned four containers running:

The script file in chaincode-docker-devmode only contains the following two commands:
peer channel create -c myc -f myc.tx -o orderer:7050
peer channel join -b myc.block
The first command creates the myc channel using the specified configuration file in the myc.tx file. The myc.tx file is generated by the configtxgen tool. This tool also generates orderer.block.
The second command joins the created channel with myc.block to the cli container. With these four containers, we can deploy our chaincode to the Fabric in the development environment.
Let's now carry out some tests from the cli container.
- 尖叫的數(shù)學(xué):令人驚嘆的數(shù)學(xué)之美
- 數(shù)學(xué)建模:算法與編程實(shí)現(xiàn)
- 好玩的數(shù)學(xué)符號(hào)
- 其實(shí)你對數(shù)學(xué)的誤會(huì)很大(共5冊)
- 數(shù)學(xué)的雨傘下:理解世界的樂趣
- 別說你不懂?dāng)?shù)學(xué)
- 物性數(shù)學(xué)及其應(yīng)用
- 高等數(shù)學(xué)同步練習(xí)指導(dǎo)
- Hands-On IoT Solutions with Blockchain
- 2016年管理類專業(yè)學(xué)位聯(lián)考綜合能力考試 數(shù)學(xué)考點(diǎn)歸納與真題解析
- ANSYS Workbench 2020有限元分析從入門到精通(升級(jí)版)
- 概率論與數(shù)理統(tǒng)計(jì)
- 迷人的數(shù)學(xué)+美麗的數(shù)學(xué)(共2冊)
- 10倍速心算:寫給中小學(xué)生的56個(gè)心算技巧
- 不可能的幾何挑戰(zhàn):數(shù)學(xué)求索兩千年