在尝试实例化链代码后,我得到了下面的错误:
2018-03-28 12:51:27.568 UTC [util] DockerBuild -> DEBU 3b2 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.0.6
2018-03-28 12:51:28.418 UTC [chaincode-platform] func1 -> ERRO 3b3 Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package chaincode/chaincode_example02: cannot find package "chaincode/chaincode_example02" in any of:
/opt/go/src/chaincode/chaincode_example02 (from $GOROOT)
/chaincode/input/src/chaincode/chaincode_example02 (from $GOPATH)
/opt/gopath/src/chaincode/chaincode_example02好吧,之前的操作,如channel create,channel join和chaincode install都成功了,或者至少在日志上没有错误消息。我正在运行来自cli容器的所有命令,并且链码存在于所提到的路径上。
有人能告诉我到底发生了什么吗?
发布于 2018-06-26 22:33:17
您没有正确挂载docker-compose-cli.yaml中的chaincode文件夹。
在volume部分,检查链码的路径。
在我的例子中,链码文件夹位于/home/b/fabric-samples/chaincode中
所以我像这样把它装入卷中
- /home/b/fabric-samples/chaincode:/opt/gopath/src/github.com/chaincodehttps://stackoverflow.com/questions/49536723
复制相似问题