dockerkuberneteshyperledger-fabrichyperledger-chaincode

docker build is disabled error when installing my chaincode on hyperledger fabric


I am creating a hyperledger fabric network using the following hyperledger fabric operator for kubernetes https://github.com/hyperledger-labs/hlf-operator I have my cluster configured in aws eks and it is currently running 3 nodes. I am following the documentation and so far all the steps of the implementation are working without problem, but when installing my chaincode it shows me the following message:

'InstallChaincode': could not build chaincode: docker build failed: docker build is disabled

Validate and change docker permissions but I don't understand what I am missing so that it can work and install my chaincode.

I think it may be a permissions error in the eks, I am also validating the permissions


Solution

  • I encountered the same problem and I finally solved it. The problem is when you create your peer node right now (as of July 28, 2022), the version defaults to 2.3.0-v0.0.2 (you can find this kubectl hlf peer create --help and see the description next to the --version flag). This peer version happens to be incompatible when deploying ccaas - chaincode as a service. So, the solution is to manually override the version using the --version flag while creating the peer node. Peer version 2.4.1-v0.0.4 solved this for me.

    Please see the below command while creating a peer node for org1.

    kubectl hlf peer create --statedb=couchdb --storage-class=standard --enroll-id=org1-peer --mspid=Org1MSP --enroll-pw=peerpw --capacity=5Gi --name=org1-peer0 --ca-name=org1-ca.fabric --version=2.4.1-v0.0.4 --namespace=fabric
    

    Note the above steps apply only when you are using the peer image from quay.io/kfsoftware/fabric-peer which is the default image. If you want to use other images use the --image tag. Repeat the same steps while creating every peer node. This should solve your problem. Hope this helps!