1

A peer has been installed in a container. I wanted to instantiate a chaincode in the container, but it failed because the version of a docker image doesn't exist. enter image description here

so, I want to change "fabric-ccenv:latest" to "fabric-ccenv:2.1". I have tried to modify the core.yaml, but it has no effect. enter image description here

I also tried to directly export the varible, it also has no effect. enter image description here

my question is how to make the configure effective. maybe my solution is false, but i reffer this link:Instantiation of Chaincode using Fabric Node SDK gives API error (404): manifest for hyperledger/fabric-ccenv:latest not found

I really appreciate your warm-hearted help.

shi jianfeng
  • 81
  • 1
  • 1
  • 4

1 Answers1

1

In docker-compose.yaml

in "volumes" section of your peer: create bind to location of your edited core.yaml

e.g.: - ./channel/config-peers/org1-peer0/:/etc/hyperledger/peer

in the "environment" section of your peer: add FABRIC_CFG_PATH= path to location of edited core.yaml

e.g.: FABRIC_CFG_PATH=/etc/hyperledger/peer
Carlo
  • 11
  • 2