Skip to content

Commit

Permalink
fix(docker): add optional arm architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
storopoli committed Oct 17, 2024
1 parent 86b9a94 commit a455dc6
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions docker/bitcoind/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,24 @@ WORKDIR /app

# Set bitcoind version and architecture as build arguments
ARG BITCOIND_VERSION="28.0"
ARG BITCOIND_ARCH="x86_64-linux-gnu"
ARG SHASUM="7fe294b02b25b51acb8e8e0a0eb5af6bbafa7cd0c5b0e5fcbb61263104a82fbc"
ARG BITCOIND_ARCH="x86_64-linux-gnu" # Default: x86_64
#ARG BITCOIND_ARCH="arm64-apple-darwin" # For Apple Silicon
#ARG BITCOIND_ARCH="aarch64-linux-gnu" # For ARM64
ARG SHASUM_X86_64="7fe294b02b25b51acb8e8e0a0eb5af6bbafa7cd0c5b0e5fcbb61263104a82fbc"
ARG SHASUM_APPLE_ARM64="c8108f30dfcc7ddffab33f5647d745414ef9d3298bfe67d243fe9b9cb4df4c12"
ARG SHASUM_ARM64="7fa582d99a25c354d23e371a5848bd9e6a79702870f9cbbf1292b86e647d0f4e"

# Select the correct SHA256 checksum based on the architecture
RUN if [ "$BITCOIND_ARCH" = "x86_64-linux-gnu" ]; then \
export SHASUM=$SHASUM_X86_64; \
elif [ "$BITCOIND_ARCH" = "arm64-apple-darwin" ]; then \
export SHASUM=$SHASUM_APPLE_ARM64; \
elif [ "$BITCOIND_ARCH" = "aarch64-linux-gnu" ]; then \
export SHASUM=$SHASUM_ARM64; \
else \
echo "Unsupported architecture"; exit 1; \
fi && \
echo "Using SHA256 checksum: $SHASUM"

# Install necessary dependencies and add PPA
RUN apt-get update && \
Expand Down

0 comments on commit a455dc6

Please sign in to comment.