0

I am following the tutorial to build the first network at Building your first network. When in fabric-samples/first-network, I run the command:

./byfn.sh -m generate

two peers, channel, chaincode, orderer genesis block and cryptogen are created successfully. But when I run the command:

./byfn.sh -m up

I get the error "line 159: docker compose: command not found. ERROR!!! Undable to start network."

I have made a new clean Ubuntu 16.04 and installed everything to make sure everything is clean. But again I get the same error. When I nano ./byfn.sh, line 159 is as follows:

    IMAGE_TAG=$IMAGETAG docker-compose -f $COMPOSE_FILE up -d 2>&1

And when I run:

./byfn.sh -m up -l node

I am getting the same error. The error message is shown in the image below:

Both (./byfn -m up) and (./byfn.sh -m up -l node) don't bring the network up.

When I run:

./byfn.sh -m down

I get a different error. This time the error is at lines 235 and 236; result of nano is as follows:

docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_COUCH down --volumes

docker-compose -f $COMPOSE_FILE down –volumes

I have added go to path as shown in installation guide. version of node is also compatible as mentioned v9.x is not supported yet, I have installed v8.

Should I make changes to liens 159, 235 and 236 of ./byfn.sh? If so, how should I change it? Or ahve I done some setup incorrectly?! I appreciate your help.

Thank you.

E. Erfan
  • 1,239
  • 19
  • 37

1 Answers1

3

docker-compose is another software package that has to be installed (it is a tool for defining and running multi-container Docker applications) and you didn't installed it.
To install docker-compose run these commands:

sudo apt-get update
sudo apt-get install docker-compose

Then run the byfn file.

Reference:https://docs.docker.com/compose/overview/

  • Hi, no I have installed it immediately after installing docker itself. I checked its version and when I do docker ps -aq I can see docker-compose as well. – E. Erfan Apr 26 '18 at 11:32
  • Hi, @E.Erfan by running docker ps -aq you will get the container ID's, how are you getting docker-compose. Can you share the output or screenshot for clarity. Thanks – Jasti Sri Radhe Shyam Apr 27 '18 at 06:17
  • 2
    The problem was it was not added to the path for some reason. – E. Erfan May 06 '18 at 18:43