I am trying to work on my first network in Hyperledger Fabric. Using the following documentation http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html
<
Let's try to make sure you run thru all the steps as outlined in docs.
First of all you need to edit your docker-compose-cli.yaml
file the cli section to comment out line responsible to run automatic flow of channel creation and join:
command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; sleep $TIMEOUT'
E.g.
# command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; sleep $TIMEOUT'
Next export channel name you are working with:
export CHANNEL_NAME=mychannel
Start the network (use default timeout of 60s):
CHANNEL_NAME=$CHANNEL_NAME docker-compose -f docker-compose-cli.yaml up -d
Enter the cli container:
docker exec -it cli bash
Export environmental variables:
export CHANNEL_NAME=mychannel
Create the channel:
peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
Join the channel:
peer channel join -b mychannel.block