From d71c69b5a7a2637b90a8d8f6c50eb4dd0d0ea04c Mon Sep 17 00:00:00 2001 From: altafan <18440657+altafan@users.noreply.github.com> Date: Thu, 7 Dec 2023 17:26:22 +0100 Subject: [PATCH] Bitcoin 0.25.1 --- .github/workflows/docker-publish.yml | 2 +- 0.25.1/Dockerfile | 70 ++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 0.25.1/Dockerfile diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 0351bc2..46f030c 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -9,7 +9,7 @@ on: env: # TODO: Change variable to your image's name. IMAGE_NAME: bitcoin - VERSION: 0.24.0 + VERSION: 0.25.1 jobs: # Push image to GitHub Packages. diff --git a/0.25.1/Dockerfile b/0.25.1/Dockerfile new file mode 100644 index 0000000..62e358a --- /dev/null +++ b/0.25.1/Dockerfile @@ -0,0 +1,70 @@ +FROM debian:stable-slim as builder + +# VERSION of BItcoin Core to be build +ARG VERSION=25.1 + +RUN apt-get update && apt-get install -y \ + build-essential \ + automake pkg-config \ + wget curl libzmq3-dev \ + libtool autotools-dev \ + bsdmainutils python3 \ + libsqlite3-dev libdb-dev \ + libdb++-dev libevent-dev \ + libboost-dev libboost-system-dev \ + libboost-filesystem-dev libboost-test-dev + +RUN wget -qO- https://bitcoincore.org/bin/bitcoin-core-$VERSION/bitcoin-$VERSION.tar.gz | tar -xvz + +WORKDIR /bitcoin-$VERSION + +RUN cd ./depends && make NO_QT=1 NO_UPNP=1 && cd .. && ./autogen.sh + +RUN ./configure \ + CXXFLAGS="-O2" \ + --disable-man \ + --disable-shared \ + --disable-ccache \ + --disable-tests \ + --enable-static \ + --enable-reduce-exports \ + --without-gui \ + --without-libs \ + --with-utils \ + --with-zmq \ + --with-sqlite=yes \ + --without-miniupnpc \ + --with-incompatible-bdb + +RUN make clean +RUN make -j$(( $(nproc) + 1 )) check +RUN make install + +RUN mv ./src/bitcoind /bitcoind && \ + mv ./src/bitcoin-cli /bitcoin-cli + +FROM debian:stable-slim + +RUN apt-get update && apt-get install -y \ + libboost-system-dev \ + libboost-filesystem-dev \ + libboost-thread-dev \ + libevent-dev \ + libsodium-dev \ + libdb-dev \ + libdb++-dev \ + libzmq3-dev \ + libsqlite3-dev + +RUN useradd -ms /bin/bash bitcoin +USER bitcoin + + +COPY --from=builder /bitcoind /usr/local/bin/bitcoind +COPY --from=builder /bitcoin-cli /usr/local/bin/bitcoin-cli + +# Prevents `VOLUME $HOME/.bitcoin/` being created as owned by `root` +RUN mkdir -p "$HOME/.bitcoin/" + +ENTRYPOINT [ "bitcoind" ] +