Last active
September 18, 2025 15:14
-
-
Save Raimo33/4de6298007cf6f3982b6d341abc316d8 to your computer and use it in GitHub Desktop.
Bitcoin IBD run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM debian:trixie-slim AS builder | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| pkg-config \ | |
| cmake \ | |
| ninja-build \ | |
| libboost-system-dev \ | |
| libboost-filesystem-dev \ | |
| libboost-program-options-dev \ | |
| libevent-dev \ | |
| libcapnp-dev \ | |
| capnproto | |
| WORKDIR /opt/bitcoin | |
| COPY . . | |
| RUN rm -rf build | |
| WORKDIR /opt/bitcoin/build | |
| RUN cmake .. -G Ninja \ | |
| -DCMAKE_INSTALL_PREFIX="/usr/local/" \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DBUILD_DAEMON=ON \ | |
| -DBUILD_TESTS=ON \ | |
| -DENABLE_IPC=ON \ | |
| -DBUILD_BITCOIN_BIN=OFF \ | |
| -DBUILD_GUI=OFF \ | |
| -DBUILD_CLI=OFF \ | |
| -DBUILD_TX=OFF \ | |
| -DBUILD_UTIL=OFF \ | |
| -DBUILD_WALLET_TOOL=OFF \ | |
| -DBUILD_UTIL_CHAINSTATE=OFF \ | |
| -DBUILD_KERNEL_LIB=OFF \ | |
| -DBUILD_BENCH=OFF \ | |
| -DBUILD_FUZZ_BINARY=OFF \ | |
| -DENABLE_WALLET=OFF \ | |
| -DENABLE_EXTERNAL_SIGNER=OFF \ | |
| -DWITH_ZMQ=OFF \ | |
| -DWITH_USDT=OFF \ | |
| -DINSTALL_MAN=OFF \ | |
| -DWITH_CCACHE=OFF | |
| RUN cmake --build . | |
| RUN ctest --output-on-failure | |
| RUN cmake --install . | |
| RUN strip --strip-unneeded /usr/local/bin/bitcoind | |
| FROM debian:trixie-slim AS final | |
| RUN apt-get update && apt-get install -y \ | |
| libboost-system1.88.0 \ | |
| libboost-filesystem1.88.0 \ | |
| libboost-program-options1.88.0 \ | |
| libevent-core-2.1-7 \ | |
| libevent-extra-2.1-7 \ | |
| libevent-pthreads-2.1-7 \ | |
| libcapnp-1.1.0 \ | |
| python3-pip \ | |
| hyperfine && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN pip install --break-system-packages pyperf | |
| COPY --from=builder /usr/local/bin/bitcoind /usr/local/bin/bitcoind | |
| WORKDIR /var/lib/bitcoin | |
| CMD ["hyperfine", \ | |
| "--runs", "3", \ | |
| "--setup", "pyperf system tune; bitcoind -datadir=. -stopatheight=1", \ | |
| "--prepare", "rm -rf blocks/ chainstate/", \ | |
| "--cleanup", "pyperf system reset", \ | |
| "bitcoind -datadir=. -listen=0 -dnsseed=0 -fixedseeds=0 -printtoconsole=0 -blocksonly=1 -stopatheight=900000 -dbcache=4096"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run with: