File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM --platform=linux/amd64 debian:stable-slim as build
1+ FROM debian:stable-slim as build
22
33# Install & update base system
44RUN apt-get update && apt-get upgrade -y
@@ -13,8 +13,15 @@ ENV BITCOIN_DIR=/bitcoin
1313# Create the directory where Bitcoin Core will be installed
1414RUN mkdir -p $BITCOIN_DIR
1515
16- # Download the selected binary release of Bitcoin Core
17- RUN wget https://github.com/Sjors/bitcoin/releases/download/$BITCOIN_VERSION/bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz -O /tmp/bitcoin.tar.gz
16+ RUN ARCH=$(dpkg --print-architecture) && \
17+ if [ "$ARCH" = "amd64" ]; then \
18+ BITCOIN_URL=https://github.com/Sjors/bitcoin/releases/download/$BITCOIN_VERSION/bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz; \
19+ elif [ "$ARCH" = "arm64" ]; then \
20+ BITCOIN_URL=https://github.com/Sjors/bitcoin/releases/download/$BITCOIN_VERSION/bitcoin-$BITCOIN_VERSION-aarch64-linux-gnu.tar.gz; \
21+ else \
22+ echo "Unsupported architecture" ; exit 1; \
23+ fi && \
24+ wget $BITCOIN_URL -O /tmp/bitcoin.tar.gz
1825
1926# Extract the downloaded tarball
2027RUN tar -xzvf /tmp/bitcoin.tar.gz -C $BITCOIN_DIR --strip-components=1
You can’t perform that action at this time.
0 commit comments