Skip to content

Commit 5c1347a

Browse files
authored
Merge pull request hyperledger-cello#760 from hyperledger-cello/haibo/add_arm64_support
fix: detect container architecture for Fabric binary download in agent Dockerfile
2 parents ceebb47 + 26e2374 commit 5c1347a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/agents/hyperledger-fabric/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ COPY . .
1313
RUN mkdir cello
1414

1515
# Install compiled code tools from Artifactory and copy it to opt folder.
16-
RUN curl -L --retry 5 --retry-delay 3 "https://github.com/hyperledger/fabric/releases/download/v2.5.14/hyperledger-fabric-linux-amd64-2.5.14.tar.gz" | tar xz -C ./cello/
16+
RUN ARCH=$(dpkg --print-architecture) && \
17+
case "$ARCH" in \
18+
amd64|arm64) FABRIC_ARCH="$ARCH" ;; \
19+
*) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;; \
20+
esac && \
21+
curl -fsSL --retry 5 --retry-delay 3 "https://github.com/hyperledger/fabric/releases/download/v2.5.14/hyperledger-fabric-linux-${FABRIC_ARCH}-2.5.14.tar.gz" | tar xz -C ./cello/
1722

1823
# Install python dependencies
1924
RUN pip3 install -r requirements.txt

0 commit comments

Comments
 (0)