Skip to content
Merged
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:bullseye-slim as builder

ARG BITCOIN_VERSION="d4a86277ed8a"
ARG TRIPLET=${TRIPLET:-"x86_64-linux-gnu"}
ARG TARGETARCH
ARG TRIPLET
Comment on lines +4 to +5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these params need to be added to the docker-compose so we don't break the current build

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TARGETARCH is automatically supplied by Docker and TRIPLET is optional


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:bullseye-slim as custom-signet-bitcoin

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