Skip to content

Commit ed1f18b

Browse files
YusukeShimizucdecker
authored andcommitted
gltesting: use correct bins for each arch
Enable multi-architecture support to ensure proper cfssl and bitcoind downloads based on the build environment. This fixes issues on ARM64 where the x86_64 binary was previously being downloaded, leading to the missing ld-linux-x86-64.so.2 error.
1 parent ad0282e commit ed1f18b

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docker/gl-testing/Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,18 @@ RUN chmod a+rwx -R $CARGO_HOME
8383
# Downloads bitcoin-core
8484
FROM ubuntu:22.04 AS bitcoin-downloader
8585
RUN apt update && apt install -qqy wget
86+
ARG TARGETPLATFORM
8687

8788
ARG BITCOIN_VERSION=25.0
8889

89-
RUN cd /tmp/ && \
90-
wget "https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz" -O bitcoin.tar.gz && \
90+
RUN PLATFORM=$( \
91+
case ${TARGETPLATFORM} in \
92+
linux/amd64 ) echo "x86_64";; \
93+
linux/arm64 ) echo "aarch64";; \
94+
esac \
95+
) && \
96+
cd /tmp/ && \
97+
wget "https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${PLATFORM}-linux-gnu.tar.gz" -O bitcoin.tar.gz && \
9198
tar -xvzf bitcoin.tar.gz && \
9299
mv /tmp/bitcoin-$BITCOIN_VERSION/ /opt/bitcoin && \
93100
rm -rf bitcoin.tar.gz /tmp/bitcoin-$BITCOIN_VERSION
@@ -97,12 +104,13 @@ RUN cd /tmp/ && \
97104
# --------------------------------------
98105
# Downloads cloudlfares SSL binaries
99106
FROM ubuntu:22.04 AS cfssl-downloader
107+
ARG TARGETARCH
100108

101109
RUN apt update && apt install -qqy wget
102110

103-
RUN wget -q https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl_1.5.0_linux_amd64 -O /usr/bin/cfssl && \
111+
RUN wget -q https://github.com/cloudflare/cfssl/releases/download/v1.6.5/cfssl_1.6.5_linux_${TARGETARCH} -O /usr/bin/cfssl && \
104112
chmod a+x /usr/bin/cfssl
105-
RUN wget -q https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssljson_1.5.0_linux_amd64 -O /usr/bin/cfssljson && \
113+
RUN wget -q https://github.com/cloudflare/cfssl/releases/download/v1.6.5/cfssljson_1.6.5_linux_${TARGETARCH} -O /usr/bin/cfssljson && \
106114
chmod a+x /usr/bin/cfssljson
107115

108116
# ----------------------------------------

0 commit comments

Comments
 (0)