gpt4 book ai didi

hyperledger-fabric - Hyperledger Fabric 2.0 -chaincode 作为外部服务 :Unknown chaincodeType: EXTERNAL

转载 作者:行者123 更新时间:2023-12-04 11:36:20 24 4
gpt4 key购买 nike

我正在尝试将链码设置为 official doc 中指定的外部服务

首先是设置externalBuilder多变的

chaincode:
externalBuilders:
- name: my-golang-builder
path: /builders/golang

在我的对等配置中,我添加了以下内容来覆盖它
- CORE_CHAINCODE_EXTERNALBUILDERS_PATH=/var/hyperledger/builderpath
- CORE_CHAINCODE_EXTERNALBUILDERS_NAME=externalbuilder

但是当我运行 peer install lifecycle 时我正进入(状态
docker build failed: platform builder failed: Failed to generate a Dockerfile: Unknown chaincodeType: EXTERNAL

尽管如此,它仍然尝试安装,因为旧的方式似乎没有检测到我的外部构建器路径

谁能知道解决办法

更新

对等体.yaml
peer1.base.right:
container_name: peer1.right.base
extends:
file: base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.right.base
- CORE_PEER_ADDRESS=peer1.right.base:9051
- CORE_PEER_LISTENADDRESS=0.0.0.0:9051
- CORE_PEER_CHAINCODEADDRESS=peer1.right.base:9052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.right.base:10051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.right.base:9051
- CORE_PEER_LOCALMSPID=RightOrgMSP
volumes:
- /var/run/:/host/var/run/
- ./crypto-config/peerOrganizations/base.right/peers/peer1.base.right/msp:/etc/hyperledger/fabric/msp
- ./crypto-config/peerOrganizations/base.right/peers/peer1.base.right/tls:/etc/hyperledger/fabric/tls
- ./chaincode/external_builder:/builders/external
- ./fabric-config:/etc/hyperledger/fabric
- peer1.base.right:/var/hyperledger/production
ports:
- 9051:9051
networks:
- ./fabric-config:/etc/hyperledger/fabric是core.yaml的路径

core.yaml
 ......
externalBuilders:
- name: external-builder
path: /builders/external
environmentWhitelist:
- GOPROXY
......

最佳答案

您不能使用环境属性覆盖 chaincode.externalbuilders。它是一个复杂的对象,而不是一组单独的属性。并非 core.yaml 中的所有属性都可以用环境变量覆盖。

关于hyperledger-fabric - Hyperledger Fabric 2.0 -chaincode 作为外部服务 :Unknown chaincodeType: EXTERNAL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61405242/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com