Docker无法创建容器,挂载被拒绝

时间:2018-10-12 19:21:50

标签: docker docker-compose hyperledger-fabric

我正在研究超级账本结构样本示例。在执行“ ./byfn.sh”的“第一个网络”示例中,出现以下错误:

$ ./byfn.sh up
Starting for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] Y
proceeding ...
LOCAL_VERSION=1.3.0
DOCKER_IMAGE_VERSION=1.3.0
/c/Users/array-a/fabric-samples/bin/cryptogen

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
+ cryptogen generate --config=./crypto-config.yaml
org1.example.com
org2.example.com
+ res=0
+ set +x


    /c/Users/array-a/fabric-samples/bin/configtxgen
    ##########################################################
    #########  Generating Orderer Genesis block ##############
    ##########################################################
    + configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
    2018-10-13 00:23:15.910 IST [common/tools/configtxgen] main -> WARN 001 Omitting the channel ID for configtxgen for output operations is deprecated.  Explicitly passing the channel ID will be required in the future, defaulting to 'testchainid'.
    2018-10-13 00:23:15.910 IST [common/tools/configtxgen] main -> INFO 002 Loading configuration
    2018-10-13 00:23:16.018 IST [common/tools/configtxgen] doOutputBlock -> INFO 003 Generating genesis block
    2018-10-13 00:23:16.026 IST [common/tools/configtxgen] doOutputBlock -> INFO 004 Writing genesis block
    + res=0
    + set +x

    #################################################################
    ### Generating channel configuration transaction 'channel.tx' ###
    #################################################################
    + configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID mychannel
    2018-10-13 00:23:16.988 IST [common/tools/configtxgen] main -> INFO 001 Loading configuration
    2018-10-13 00:23:17.042 IST [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
    2018-10-13 00:23:17.102 IST [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 003 Writing new channel tx
    + res=0
    + set +x

    #################################################################
    #######    Generating anchor peer update for Org1MSP   ##########
    #################################################################
    + configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP
    2018-10-13 00:23:17.692 IST [common/tools/configtxgen] main -> INFO 001 Loading configuration
    2018-10-13 00:23:17.746 IST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
    2018-10-13 00:23:17.746 IST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update
    + res=0
    + set +x

    #################################################################
    #######    Generating anchor peer update for Org2MSP   ##########
    #################################################################
    + configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID mychannel -asOrg Org2MSP
    2018-10-13 00:23:18.406 IST [common/tools/configtxgen] main -> INFO 001 Loading configuration
    2018-10-13 00:23:18.456 IST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
    2018-10-13 00:23:18.458 IST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update
    + res=0
    + set +x

    Creating network "net_byfn" with the default driver
    Creating volume "net_orderer.example.com" with default driver
    Creating volume "net_peer0.org1.example.com" with default driver
    Creating volume "net_peer1.org1.example.com" with default driver
    Creating volume "net_peer0.org2.example.com" with default driver
    Creating volume "net_peer1.org2.example.com" with default driver
    Creating peer1.org1.example.com ...
    Creating peer1.org2.example.com ... error
    Creating peer0.org1.example.com ...
    Creating orderer.example.com    ...
    Creating peer1.org1.example.com ... error

    Creating peer0.org2.example.com ... error

    Creating peer0.org1.example.com ... error

    ERROR: for peer1.org1.example.com  Cannot create container for service peer1.org1.example.com: b'Mount denied:\nThe source path "\\\\var\\\\run:/host/var/run/"\nis not a valid Windows path'
    Creating orderer.example.com    ... done
    ERROR: for peer0.org1.example.com  Cannot create container for service peer0.org1.example.com: b'Mount denied:\nThe source path "\\\\var\\\\run:/host/var/run/"\nis not a valid Windows path'

    ERROR: for peer1.org2.example.com  Cannot create container for service peer1.org2.example.com: b'Mount denied:\nThe source path "\\\\var\\\\run:/host/var/run/"\nis not a valid Windows path'

    ERROR: for peer0.org2.example.com  Cannot create container for service peer0.org2.example.com: b'Mount denied:\nThe source path "\\\\var\\\\run:/host/var/run/"\nis not a valid Windows path'

    ERROR: for peer1.org1.example.com  Cannot create container for service peer1.org1.example.com: b'Mount denied:\nThe source path "\\\\var\\\\run:/host/var/run/"\nis not a valid Windows path'

    ERROR: for peer0.org1.example.com  Cannot create container for service peer0.org1.example.com: b'Mount denied:\nThe source path "\\\\var\\\\run:/host/var/run/"\nis not a valid Windows path'
    ERROR: Encountered errors while bringing up the project.
    ERROR !!!! Unable to start network

Googled,发现我必须将这一行 COMPOSE_CONVERT_WINDOWS_PATHS = 1 放入ENV文件中,才能从Linux转换为window的路径。 但是随后在docker-compose-base.yml中出现了一个新错误,表明它无法解析该行。

0 个答案:

没有答案