[fabric]Cannot start service orderer: Mounts denied: In Mac

王一洋發表於2019-01-26
docker-compose -f docker-compose-simple.yaml up

console output like this:

Starting orderer ... 
Starting orderer ... error

ERROR: for orderer  Cannot start service orderer: Mounts denied: 
The paths /opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode-docker-devmode/msp and /opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode-docker-devmode/orderer.block
are not shared from OS X and are not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.

ERROR: for orderer  Cannot start service orderer: Mounts denied: 
The paths /opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode-docker-devmode/msp and /opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode-docker-devmode/orderer.block
are not shared from OS X and are not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
ERROR: Encountered errors while bringing up the project.

then ,we need to set the /opt/gopath to docker sharing path:

click the docker logo in the mac desktop,the select Preferences,follow me:

then,that's OK

Starting orderer ... 
Starting orderer ... done
Creating peer ... 
Creating peer ... done
Creating cli ... 
Creating chaincode ... 
Creating cli
Creating cli ... done
Attaching to orderer, peer, chaincode, cli

 

相關文章