fabric-samples/first-network/base/peer-base.yaml
BA e88873f2e1 Error when trying to instanciate chaincode
CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE is set to "byfn_default" but this network interface does not exist, resulting in an error when trying to instanciate chainecode. As the docker compose file is in the folder "first-network", docker will create a default network called "firstnetwork_default", so should change the env. variable accordingly.
Other solution could be to define a custom network "byfn_default" in the docker-compose-cli.yaml file using top-level key "networks" (https://docs.docker.com/compose/networking/)
2017-06-22 16:06:11 +02:00

28 lines
1.1 KiB
YAML

# 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.
# As the docker compose file is in the folder "first-network",
# docker will create a default network called "firstnetwork_default"
# https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=firstnetwork_default
#- CORE_LOGGING_LEVEL=ERROR
- CORE_LOGGING_LEVEL=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