You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.2 KiB

ARG ARCH=amd64
ARG VERSION=0.19.1
FROM $ARCH/debian:stable-slim
5 years ago
LABEL maintainer="Luke Childs <lukechilds123@gmail.com>"
ARG ARCH
ARG VERSION
5 years ago
RUN cd /tmp && \
5 years ago
if [ "${ARCH}" = "amd64" ]; then export TARBALL_ARCH=x86_64-linux-gnu; fi && \
if [ "${ARCH}" = "arm64v8" ]; then export TARBALL_ARCH=aarch64-linux-gnu; fi && \
if [ "${ARCH}" = "arm32v7" ]; then export TARBALL_ARCH=arm-linux-gnueabihf; fi && \
TARBALL="bitcoin-${VERSION}-${TARBALL_ARCH}.tar.gz" && \
5 years ago
apt-get update && \
apt-get install -y wget gpg && \
wget https://bitcoincore.org/bin/bitcoin-core-${VERSION}/${TARBALL} && \
wget https://bitcoincore.org/bin/bitcoin-core-${VERSION}/SHA256SUMS.asc && \
gpg --keyserver keyserver.ubuntu.com --recv-keys 01EA5486DE18A882D4C2684590C8019E36C2E964 && \
gpg --verify SHA256SUMS.asc && \
grep $TARBALL SHA256SUMS.asc | sha256sum -c && \
tar -zxvf $TARBALL --strip-components=1 && \
mv bin/bitcoind /usr/local/bin/ && \
mv bin/bitcoin-cli /usr/local/bin/ && \
apt-get purge -y wget gpg && \
5 years ago
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV HOME /data
VOLUME /data/.bitcoin
5 years ago
EXPOSE 8332 8333 18332 18333 18443 18444
5 years ago
ENTRYPOINT ["bitcoind"]