hyperledger / firefly-cli

FireFly Command Line Interface (CLI)
Apache License 2.0
56 stars 50 forks source link

Creating a new stack yields: `Error: no version for docker-compose has been detected` #306

Closed cradonn closed 2 weeks ago

cradonn commented 3 weeks ago

Following the walkthrough here: https://hyperledger.github.io/firefly/latest/tutorials/chains/fabric_test_network/

When trying to init a new stack with the following:

ff init fabric dev --ccp "/home/developer/org1_ccp.yml" --msp "organizations" --ccp "/home/developer/org2_ccp.yml" --msp "organizations" --channel mychannel --chaincode firefly

I get back: Error: no version for docker-compose has been detected

Not experiencing issues with docker / docker compose:

developer@devbox:~/fabric-samples/test-network$ ff init fabric dev --ccp "/home/developer/org1_ccp.yml" --msp "organizations" --ccp "/home/developer/org2_ccp.yml" --msp "organizations" --channel mychannel --chaincode firefly
initializing new FireFly stack...
Error: no version for docker-compose has been detected
Usage:
  ff init fabric [stack_name] [member_count] [flags]

Flags:
      --ccp stringArray      Path to the ccp.yaml file for an org in your Fabric network
      --chaincode string     The name given to the FireFly chaincode when it was deployed
      --channel string       The name of the Fabric channel on which the FireFly chaincode has been deployed
      --custom-pin-support   Configure the blockchain listener to listen for BatchPin events from any chaincode on the channel
  ........
  ........

Error: no version for docker-compose has been detected
developer@devbox:~/fabric-samples/test-network$ docker version
Client: Docker Engine - Community
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:28:57 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
developer@devbox:~/fabric-samples/test-network$ docker-compose version
Docker Compose version v2.27.1
EnriqueL8 commented 2 weeks ago

Interesting... I've just raised a PR to prioritise V2 of Docker Compose so it might be that it's throwing an error on looking at V1 and you have V2 installed. V1 has been deprecated, PR in question https://github.com/hyperledger/firefly-cli/pull/307

cradonn commented 2 weeks ago

@EnriqueL8 turns out it the issue was nothing to do with docker after all, I had a permissions issue reading files under the fabric-samples/test-network/organizations/ directory. Changing ownership from root to my own user resolved it.