使用Docker在本地运行Hyperledger时出错

时间:2018-07-02 06:53:11

标签: amazon-web-services docker docker-compose hyperledger-fabric blockchain

使用Docker在本地运行Hyperledger时出错。

有人可以帮忙吗?

# docker-compose up
ERROR: yaml.parser.ParserError: while parsing a block mapping
 in “./docker-compose.yml”, line 1, column 1
expected <block end>, but found ‘<block mapping start>’
 in “./docker-compose.yml”, line 6, column 2

cat docker-compose.yml

membersrvc:
 image: hyperledger/fabric-membersrvc
 ports:
 — “7054:7054”
 command: membersrvc
 vp0:
 image: hyperledger/fabric-peer
 ports:
 — “7050:7050”
 — “7051:7051”
 — “7053:7053”
 environment:
 — CORE_PEER_ADDRESSAUTODETECT=true
 — CORE_VM_ENDPOINT=unix:///var/run/docker.sock
 — CORE_LOGGING_LEVEL=DEBUG
 — CORE_PEER_ID=vp0
 — CORE_PEER_PKI_ECA_PADDR=membersrvc:7054
 — CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
 — CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
 — CORE_SECURITY_ENABLED=true
 — CORE_SECURITY_ENROLLID=test_vp0
 — CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT
 links:
 — membersrvc
 command: sh -c “sleep 5; peer node start — peer-chaincodedev”

我正在AWS Amazon Linux ec2-instance上尝试此操作:

# uname -a

    Linux ip-192–168–1–135 4.14.33–51.37.amzn1.x86_64 #1 SMP Thu May 3 20:07:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

ref:https://blog.craftworkz.co/run-hyperledger-locally-with-docker-4f3bcb815c03

1 个答案:

答案 0 :(得分:0)

知道了!

只需在开始时就删除多余的空间。

应为“ vp0:”

在此处测试代码: https://yaml-online-parser.appspot.com/