Skip to content

add support for arm64 builds for use on rpi #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
FROM debian:buster-slim as builder

ARG BITCOIN_VERSION="d4a86277ed8a"
ARG TRIPLET=${TRIPLET:-"x86_64-linux-gnu"}
ARG TARGETARCH
ARG TRIPLET

RUN apt-get update && \
apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget libc6 procps python3
WORKDIR /tmp

# install bitcoin binaries
RUN BITCOIN_URL="https://github.com/benthecarman/bitcoin/releases/download/paircommit/bitcoin-${BITCOIN_VERSION}-${TRIPLET}.tar.gz" && \
# Set TRIPLET based on TARGETARCH if not provided
RUN if [ -z "$TRIPLET" ]; then \
if [ "$TARGETARCH" = "arm64" ]; then \
TRIPLET=aarch64-linux-gnu; \
elif [ "$TARGETARCH" = "amd64" ]; then \
TRIPLET=x86_64-linux-gnu; \
else \
TRIPLET=x86_64-linux-gnu; \
fi; \
fi; \
echo "Using TRIPLET=$TRIPLET" && \
BITCOIN_URL="https://github.com/benthecarman/bitcoin/releases/download/paircommit/bitcoin-${BITCOIN_VERSION}-${TRIPLET}.tar.gz" && \
BITCOIN_FILE="bitcoin-${BITCOIN_VERSION}-${TRIPLET}.tar.gz" && \
wget -qO "${BITCOIN_FILE}" "${BITCOIN_URL}" && \
mkdir -p bin && \
tar -xzvf "${BITCOIN_FILE}" -C /tmp/bin --strip-components=2 "bitcoin-${BITCOIN_VERSION}/bin/bitcoin-cli" "bitcoin-${BITCOIN_VERSION}/bin/bitcoind" "bitcoin-${BITCOIN_VERSION}/bin/bitcoin-wallet" "bitcoin-${BITCOIN_VERSION}/bin/bitcoin-util"

FROM debian:buster-slim as custom-signet-bitcoin

LABEL org.opencontainers.image.authors="NBD"
Expand Down