If you are referring to the First Network example, you can see the volume mapping in CLI container (extracted from docker-compose-cli.yaml
).
volumes:
- /var/run/:/host/var/run/
- ./../chaincode/:/opt/gopath/src/github.com/chaincode
- ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
- ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
From which the fabric-samples/chaincode
directory in your localhost is mapped to /opt/gopath/src/github.com/chaincode
inside CLI. You should be able to see this directory in CLI. Try go into the CLI container and check the file system.
docker exec -it cli bash
The good thing is that it’s a volume mapping. Anything you modify in fabric-samples/chaincode
in your localhost host you will see it inside the CLI container.
Hope this helps.
kc