Closed davidkel closed 1 year ago
Guys, I find a solutions, refer to https://jira.hyperledger.org/browse/FAB-18389?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&showAll=true
Note that a workaround has been merged in bootstrap script to pull down amd64 when using M1 Mac (Rosetta approach that Dave K mentioned). Got confirmation that this approach works.
Confirmed that with current (v2.4) Fabric release and current fabric-samples, these things work:
What doesn't work is deploying Node and Java chaincode using the test-network/network.sh
script, with suitable nodeenv and javaenv Docker images not found:
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Failed to pull hyperledger/fabric-nodeenv:2.4: no matching manifest for linux/arm64/v8 in the manifest list entries
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Failed to pull hyperledger/fabric-javaenv:2.4: no matching manifest for linux/arm64/v8 in the manifest list entries
A workaround is to manually pull the x86 node/javaenv Docker images in advance so the chaincode deployment process doesn't try to pull the native arm64 images, which don't exist:
docker pull --platform amd64 hyperledger/fabric-nodeenv:2.4
docker pull --platform amd64 hyperledger/fabric-javaenv:2.4
I already solve this question on my mac m1.
I already solve this question on my mac m1.
I'm not sure the arm64 Fabric Docker images you are using are a good solution for current Fabric versions, given that they were published three years ago and include this message:
"NOTE: These images were created as part of a project at Linköping University, they have not been tested in detail and will not be maintained."
All set! Additional details and discussion thread at #3876
Release pipeline is now set up to generate arm64
and amd64
builds for binaries and docker images. We should also be OK extending with additional arch specs (ppc, etc.) with minimal updates, or the next time Steve Jobs reaches out from the grave to remove a few decibels from a laptop fan.
Really looking forward to seeing this used for IoT, cel, and broadcom/Pi devices.
Happy hacking.
With the introduction of the M1 ARM chip for Apple Macbooks plus the increasing interest in ARM as an alternative to Intel it would be good if fabric supported and published native ARM binaries
M1 Mac users at the moment can make use of Rosetta 2 to use fabric (although the bootstrap script currently fails to pull down binaries and images as it looks for a non-existent ARM architecture in the image name or binary package)
On top of Mac book support it would also facilitate being able to run fabric nodes on 64bit raspberry pi 4 distros which seems to be quite popular for IOT projects