If you are referring to the First Network example, you can see the volume mapping in CLI container (extracted from docker-compose-cli.yaml).

- /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/chaincodeinside 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.


Written by

Happy to share what I learn on blockchain. Visit http://www.ledgertech.biz/kcarticles.html for my works. or reach me on https://www.linkedin.com/in/ktam1/.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store