From c7815578655ec6b32122ef83a9f4dbf4126536fb Mon Sep 17 00:00:00 2001 From: Valerio Farrotti Date: Sat, 20 Jul 2024 11:16:39 +0200 Subject: [PATCH] Added multiplatform build without splitting files --- Dockerfile | 8 +++++++- Dockerfile.arm | 15 --------------- 2 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 Dockerfile.arm diff --git a/Dockerfile b/Dockerfile index 258165a..c596f21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,18 @@ -FROM debian:bookworm +FROM --platform=$BUILDPLATFORM debian:bookworm AS base ENV PATH="${PATH}:/bitcoin-25.0/bin" RUN apt update && apt install -y wget +FROM base AS arm64-build +RUN wget https://bitcoin.org/bin/bitcoin-core-25.0/bitcoin-25.0-aarch64-linux-gnu.tar.gz +RUN tar xzf bitcoin-25.0-aarch64-linux-gnu.tar.gz + +FROM base AS amd64-build RUN wget https://bitcoin.org/bin/bitcoin-core-25.0/bitcoin-25.0-x86_64-linux-gnu.tar.gz RUN tar xzf bitcoin-25.0-x86_64-linux-gnu.tar.gz +FROM $TARGETARCH-build AS final RUN mkdir bitcoin-25.0/data RUN mkdir /.bitcoin diff --git a/Dockerfile.arm b/Dockerfile.arm deleted file mode 100644 index a5c1b5a..0000000 --- a/Dockerfile.arm +++ /dev/null @@ -1,15 +0,0 @@ -FROM debian:bookworm - -ENV PATH="${PATH}:/bitcoin-25.0/bin" - -RUN apt update && apt install -y wget - -RUN wget https://bitcoin.org/bin/bitcoin-core-25.0/bitcoin-25.0-aarch64-linux-gnu.tar.gz -RUN tar xzf bitcoin-25.0-aarch64-linux-gnu.tar.gz - -RUN mkdir bitcoin-25.0/data -RUN mkdir /.bitcoin - -ADD node/bitcoin.conf /.bitcoin/bitcoin.conf - -CMD ["bitcoind", "-conf=/.bitcoin/bitcoin.conf"]