fabric配置和启动fabric网络
先看下目录
abc@abc:~/workspace/fabric$ ls
abc.yaml channel.tx crypto-config genesis.block template.yaml
base configtx.yaml docker-compose-cli.yaml sample
然后我们找到docker-compose-cli.yaml
和base下面的
docker-compose-base.yaml peer-base.yaml
1.docker-compose-cli
2.docker-compose-base
3.peer-base
我们先来修改一下
docker-compose-cli
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
volumes:
orderer.abc.com:
peer0.org1.abc.com:
peer1.org1.abc.com:
peer0.org2.abc.com:
peer1.org2.abc.com:
networks:
byfn:
services:
orderer.abc.com:
extends:
file: base/docker-compose-base.yaml
service: orderer.abc.com
container_name: orderer.abc.com
networks:
- byfn
peer0.org1.abc.com:
container_name: peer0.org1.abc.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org1.abc.com
networks:
- byfn
peer1.org1.abc.com:
container_name: peer1.org1.abc.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org1.abc.com
networks:
- byfn
peer0.org2.abc.com:
container_name: peer0.org2.abc.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org2.abc.com
networks:
- byfn
peer1.org2.abc.com:
container_name: peer1.org2.abc.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org2.abc.com
networks:
- byfn
cli:
container_name: cli
image: hyperledger/fabric-tools:$IMAGE_TAG
tty: true
stdin_open: true
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
#- FABRIC_LOGGING_SPEC=DEBUG
- FABRIC_LOGGING_SPEC=INFO
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.org1.abc.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.abc.com/peers/peer0.org1.abc.com/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.abc.com/peers/peer0.org1.abc.com/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.abc.com/peers/peer0.org1.abc.com/tls/ca.crt
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.abc.com/users/[email protected]/msp
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: /bin/bash
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
depends_on:
- orderer.abc.com
- peer0.org1.abc.com
- peer1.org1.abc.com
- peer0.org2.abc.com
- peer1.org2.abc.com
networks:
- byfn
我们创建一个chaincode文件夹
mkdir chaincode
如果不创建的话,会自动创建
但是用户组是root
如果我们自己创建的话,用户组是go
我们再创建一个channel-artifacts文件夹
把channel.tx和genesis.block放到里面去
然后我们再看一下目录
abc@abc:~/workspace/fabric$ ls
abc.yaml chaincode configtx.yaml docker-compose-cli.yaml
base channel-artifacts crypto-config sample
然后我们来修改
docker-compose-base
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:
orderer.abc.com:
container_name: orderer.abc.com
extends:
file: peer-base.yaml
service: orderer-base
volumes:
- ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ../crypto-config/ordererOrganizations/abc.com/orderers/orderer.abc.com/msp:/var/hyperledger/orderer/msp
- ../crypto-config/ordererOrganizations/abc.com/orderers/orderer.abc.com/tls/:/var/hyperledger/orderer/tls
- orderer.abc.com:/var/hyperledger/production/orderer
ports:
- 7050:7050
peer0.org1.abc.com:
container_name: peer0.org1.abc.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org1.abc.com
- CORE_PEER_ADDRESS=peer0.org1.abc.com:7051
- CORE_PEER_LISTENADDRESS=0.0.0.0:7051
- CORE_PEER_CHAINCODEADDRESS=peer0.org1.abc.com:7052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.abc.com:8051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.abc.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org1.abc.com/peers/peer0.org1.abc.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org1.abc.com/peers/peer0.org1.abc.com/tls:/etc/hyperledger/fabric/tls
- peer0.org1.abc.com:/var/hyperledger/production
ports:
- 7051:7051
peer1.org1.abc.com:
container_name: peer1.org1.abc.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org1.abc.com
- CORE_PEER_ADDRESS=peer1.org1.abc.com:8051
- CORE_PEER_LISTENADDRESS=0.0.0.0:8051
- CORE_PEER_CHAINCODEADDRESS=peer1.org1.abc.com:8052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:8052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.abc.com:8051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.abc.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org1.abc.com/peers/peer1.org1.abc.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org1.abc.com/peers/peer1.org1.abc.com/tls:/etc/hyperledger/fabric/tls
- peer1.org1.abc.com:/var/hyperledger/production
ports:
- 8051:8051
peer0.org2.abc.com:
container_name: peer0.org2.abc.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org2.abc.com
- CORE_PEER_ADDRESS=peer0.org2.abc.com:9051
- CORE_PEER_LISTENADDRESS=0.0.0.0:9051
- CORE_PEER_CHAINCODEADDRESS=peer0.org2.abc.com:9052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.abc.com:9051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.abc.com:10051
- CORE_PEER_LOCALMSPID=Org2MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org2.abc.com/peers/peer0.org2.abc.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org2.abc.com/peers/peer0.org2.abc.com/tls:/etc/hyperledger/fabric/tls
- peer0.org2.abc.com:/var/hyperledger/production
ports:
- 9051:9051
peer1.org2.abc.com:
container_name: peer1.org2.abc.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org2.abc.com
- CORE_PEER_ADDRESS=peer1.org2.abc.com:10051
- CORE_PEER_LISTENADDRESS=0.0.0.0:10051
- CORE_PEER_CHAINCODEADDRESS=peer1.org2.abc.com:10052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:10052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.abc.com:10051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.abc.com:9051
- CORE_PEER_LOCALMSPID=Org2MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org2.abc.com/peers/peer1.org2.abc.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org2.abc.com/peers/peer1.org2.abc.com/tls:/etc/hyperledger/fabric/tls
- peer1.org2.abc.com:/var/hyperledger/production
ports:
- 10051:10051
现在我们的东西都改好了
我们来启动fabric网络
docker-compose -f docker-compose-cli.yaml up -d
我们发现报了一点小错误
abc@abc:~/workspace/fabric$ docker-compose -f docker-compose-cli.yaml up -d
WARNING: The IMAGE_TAG variable is not set. Defaulting to a blank string.
ERROR: yaml.scanner.ScannerError: mapping values are not allowed here
in "/home/abc/workspace/fabric/base/peer-base.yaml", line 10, column 35
abc@abc:~/workspace/fabric$ docker-compose -f docker-compose-cli.yaml up -d
WARNING: The IMAGE_TAG variable is not set. Defaulting to a blank string.
WARNING: The COMPOSE_PROJECT_NAME variable is not set. Defaulting to a blank string.
ERROR: no such image: hyperledger/fabric-orderer:: invalid reference format
abc@abc:~/workspace/fabric$ docker-compose -f docker-compose-cli.yaml up -d
WARNING: The COMPOSE_PROJECT_NAME variable is not set. Defaulting to a blank string.
WARNING: The IMAGE_TAG variable is not set. Defaulting to a blank string.
ERROR: no such image: hyperledger/fabric-orderer:: invalid reference format
我们重新修改一下三个文件
把IMAGE_TAG删除掉
比如这里:
cli:
container_name: cli
image: hyperledger/fabric-tools:$IMAGE_TAG
删掉后改成
cli:
container_name: cli
image: hyperledger/fabric-tools
然后我们把cli的container_name改成 cli_fabric
然后我们重新看一下三个文件
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
volumes:
orderer.abc.com:
peer0.org1.abc.com:
peer1.org1.abc.com:
peer0.org2.abc.com:
peer1.org2.abc.com:
networks:
byfn:
services:
orderer.abc.com:
extends:
file: base/docker-compose-base.yaml
service: orderer.abc.com
container_name: orderer.abc.com
networks:
- byfn
peer0.org1.abc.com:
container_name: peer0.org1.abc.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org1.abc.com
networks:
- byfn
peer1.org1.abc.com:
container_name: peer1.org1.abc.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org1.abc.com
networks:
- byfn
peer0.org2.abc.com:
container_name: peer0.org2.abc.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org2.abc.com
networks:
- byfn
peer1.org2.abc.com:
container_name: peer1.org2.abc.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org2.abc.com
networks:
- byfn
cli:
container_name: cli_fabric
image: hyperledger/fabric-tools
tty: true
stdin_open: true
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
#- FABRIC_LOGGING_SPEC=DEBUG
- FABRIC_LOGGING_SPEC=INFO
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.org1.abc.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.abc.com/peers/peer0.org1.abc.com/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.abc.com/peers/peer0.org1.abc.com/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.abc.com/peers/peer0.org1.abc.com/tls/ca.crt
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.abc.com/users/[email protected]/msp
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: /bin/bash
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
depends_on:
- orderer.abc.com
- peer0.org1.abc.com
- peer1.org1.abc.com
- peer0.org2.abc.com
- peer1.org2.abc.com
networks:
- byfn
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:
orderer.abc.com:
container_name: orderer.abc.com
extends:
file: peer-base.yaml
service: orderer-base
volumes:
- ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ../crypto-config/ordererOrganizations/abc.com/orderers/orderer.abc.com/msp:/var/hyperledger/orderer/msp
- ../crypto-config/ordererOrganizations/abc.com/orderers/orderer.abc.com/tls/:/var/hyperledger/orderer/tls
- orderer.abc.com:/var/hyperledger/production/orderer
ports:
- 7050:7050
peer0.org1.abc.com:
container_name: peer0.org1.abc.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org1.abc.com
- CORE_PEER_ADDRESS=peer0.org1.abc.com:7051
- CORE_PEER_LISTENADDRESS=0.0.0.0:7051
- CORE_PEER_CHAINCODEADDRESS=peer0.org1.abc.com:7052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.abc.com:8051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.abc.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org1.abc.com/peers/peer0.org1.abc.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org1.abc.com/peers/peer0.org1.abc.com/tls:/etc/hyperledger/fabric/tls
- peer0.org1.abc.com:/var/hyperledger/production
ports:
- 7051:7051
peer1.org1.abc.com:
container_name: peer1.org1.abc.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org1.abc.com
- CORE_PEER_ADDRESS=peer1.org1.abc.com:8051
- CORE_PEER_LISTENADDRESS=0.0.0.0:8051
- CORE_PEER_CHAINCODEADDRESS=peer1.org1.abc.com:8052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:8052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.abc.com:8051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.abc.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org1.abc.com/peers/peer1.org1.abc.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org1.abc.com/peers/peer1.org1.abc.com/tls:/etc/hyperledger/fabric/tls
- peer1.org1.abc.com:/var/hyperledger/production
ports:
- 8051:8051
peer0.org2.abc.com:
container_name: peer0.org2.abc.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org2.abc.com
- CORE_PEER_ADDRESS=peer0.org2.abc.com:9051
- CORE_PEER_LISTENADDRESS=0.0.0.0:9051
- CORE_PEER_CHAINCODEADDRESS=peer0.org2.abc.com:9052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.abc.com:9051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.abc.com:10051
- CORE_PEER_LOCALMSPID=Org2MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org2.abc.com/peers/peer0.org2.abc.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org2.abc.com/peers/peer0.org2.abc.com/tls:/etc/hyperledger/fabric/tls
- peer0.org2.abc.com:/var/hyperledger/production
ports:
- 9051:9051
peer1.org2.abc.com:
container_name: peer1.org2.abc.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org2.abc.com
- CORE_PEER_ADDRESS=peer1.org2.abc.com:10051
- CORE_PEER_LISTENADDRESS=0.0.0.0:10051
- CORE_PEER_CHAINCODEADDRESS=peer1.org2.abc.com:10052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:10052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.abc.com:10051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.abc.com:9051
- CORE_PEER_LOCALMSPID=Org2MSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/org2.abc.com/peers/peer1.org2.abc.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/org2.abc.com/peers/peer1.org2.abc.com/tls:/etc/hyperledger/fabric/tls
- peer1.org2.abc.com:/var/hyperledger/production
ports:
- 10051:10051
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:
peer-base:
image: hyperledger/fabric-peer
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
# the following setting starts chaincode containers on the same
# bridge network as the peers
# https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
- FABRIC_LOGGING_SPEC=INFO
#- FABRIC_LOGGING_SPEC=DEBUG
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: peer node start
orderer-base:
image: hyperledger/fabric-orderer
environment:
- FABRIC_LOGGING_SPEC=INFO
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
# enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
- ORDERER_KAFKA_VERBOSE=true
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
然后我们启动一下
abc@abc:~/workspace/fabric$ docker-compose -f docker-compose-cli.yaml up -d
WARNING: The COMPOSE_PROJECT_NAME variable is not set. Defaulting to a blank string.
Creating peer0.org2.abc.com ... done
Creating peer1.org1.abc.com ... done
Creating peer1.org2.abc.com ... done
Creating orderer.abc.com ... done
Creating peer0.org1.abc.com ... done
Creating cli ... error
然后我们看下docker的container容器列表
abc@abc:~/workspace/fabric$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6ef5786be7da hyperledger/fabric-tools "/bin/bash" 9 seconds ago Up 7 seconds cli_fabric
f97991781758 hyperledger/fabric-peer "peer node start" 9 minutes ago Up 9 minutes 0.0.0.0:10051->10051/tcp peer1.org2.abc.com
1d95b307a167 hyperledger/fabric-peer "peer node start" 9 minutes ago Up 9 minutes 0.0.0.0:7051->7051/tcp peer0.org1.abc.com
eb8e2d22d111 hyperledger/fabric-peer "peer node start" 9 minutes ago Up 9 minutes 0.0.0.0:8051->8051/tcp peer1.org1.abc.com
decef0055aaa hyperledger/fabric-peer "peer node start" 9 minutes ago Up 9 minutes 0.0.0.0:9051->9051/tcp peer0.org2.abc.com
我们再用一个命令看一下
docker-compose -f docker-compose-cli.yaml ps
abc@abc:~/workspace/fabric$ docker-compose -f docker-compose-cli.yaml ps
WARNING: The COMPOSE_PROJECT_NAME variable is not set. Defaulting to a blank string.
Name Command State Ports
------------------------------------------------------------------------
cli_fabric /bin/bash Up
orderer.abc.com orderer Up
peer0.org1.abc.com peer node start Up 0.0.0.0:7051->7051/tcp
peer0.org2.abc.com peer node start Up 0.0.0.0:9051->9051/tcp
peer1.org1.abc.com peer node start Up 0.0.0.0:8051->8051/tcp
peer1.org2.abc.com peer node start Up 0.0.0.0:10051->10051/tcp
然后,再看一下网络
docker network ls
abc@abc:~/workspace/fabric$ docker network ls
NETWORK ID NAME DRIVER SCOPE
90213af75fe5 bridge bridge local
e10d5b5eebdb fabric_byfn bridge local
7fb04f2c9379 host host local
5ffa8612ee4f net_byfn bridge local
3ac4bccfcb5d none null local
OK
fabric网络启动成功