Reputation: 121
I have a scenario in which it would be required for the chaincode to call an external application to do a complex proprietary job.
I know that it is basically possible (also not recommended) to call an external service e. g. via HTTP.
However, I'd like to call a binary that is locally installed on the peer simply by for example exec.Command("some application")
from the chaincode and work with its result.
The problem I am facing is that Fabric runs the chaincode itself in another docker container and not directly in the peer container, making the binary unavailable. Is there a way to share maybe a peer's volume with the runtime containers created by Fabric for chaincode execution?
Upvotes: 2
Views: 270
Reputation: 5140
You can package the binary with the chaincode package and then it will be able to execute it at the time of the chaincode execution.
Upvotes: 1