hyperledger-composer

Condition

Host could not visit Intenet directly, need to set up proxy to connect Internet. Under this situation, the docker containers could not visit Internet directly either.

Solution

Option 1

Change the route table, transfer all request to host (this was succeed, but I could not recall the details, need verified later)

Option 2

In docker instance, using below command to change the network:

export http_proxy=
export https_proxy=
export no_proxy=

In addition, if you meet DNS problem, manually update /etc/resolv.conf could work for one time (invalid after reboot or reconnect, for persist this conf please google).

You could also add above configuration in docker-compose.yml if you are running instance by this file.

version: '3'
services:
  web:
    build: .
    ports:
      - "5000:5000"
    volumes:
      - .:/code
    environment:
      FLASK_ENV: development]
      http_proxy: xxxx # update here
  redis:
    image: "redis:alpine"

DNS error, could not resolve xxx….

If the DNS you are setting is a domain name, try to use IP address directly.

Ref: cheatsheet of running hyperledger/comoiser

1.
composer archive create -t dir -n .

2.
composer network install --card PeerAdmin@hlfv1 --archiveFile [email protected] -o npmrcFile=/Users/bangqchi/Programming/cnpm/.cnpmrc

composer network upgrade --card PeerAdmin@hlfv1 --networkName tutorial-network --networkVersion 0.0.7 -O npmrcFile=/Users/bangqchi/Programming/cnpm/.cnpmrc


3.
composer network start --networkName tutorial-network --networkVersion 0.0.7 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card

composer card import --file networkadmin.card

4.
composer network ping --card admin@tutorial-network

5.
composer-rest-server

# To restart the REST server using the same options, issue the following command:

composer-rest-server -c admin@tutorial-network -n never -u true -d tutorial-network -w true