@lnliz , thanks for creating this fork !!! Let's keep it alive!
I've generated this using AI ... you may want to think of posting this to the readme , or pieces of it, to instill confidence from non-technical people on the defensive nature of the build.
What this Dockerfile does — step-by-step
| Stage |
Purpose |
Key actions |
preparer-base |
Prepares an Alpine image with gnupg. |
Imports the full set of Bitcoin Core Guix-builder public keys so later signatures can be verified. |
preparer-release (default) |
Fetches Bitcoin Core source from the official release site. |
• Downloads SHA256SUMS + its detached GPG signature and the bitcoin-$VERSION.tar.gz archive. • Verifies the signature and that the tarball hash matches. • Unpacks the source tree. |
preparer-git (optional) |
Fetches the source from GitHub instead (used for release-candidates). |
Clones the tag v$VERSION and verifies the tag’s signed commit. |
berkeleydb-prebuilt (default) |
Supplies Berkeley DB 4.8 static libraries. |
Pulls the small public image lncm/berkeleydb:v4.8.30.NC so the CI build stays fast. (hub.docker.com) |
builder |
Compiles Bitcoin Core. |
• Installs build deps (Boost, libevent, ZMQ, etc.). • Copies the verified source tree and the BDB libs. • Runs CMake with wallet, CLI, utils on and GUI/tests off. • Strips the resulting binaries and shows their SHA-256 hashes. |
final |
Creates the tiny runtime image. |
• Based on Alpine, installs only the shared libs bitcoind needs. • Copies the freshly built binaries. • Adds an un-privileged user bitcoind and exposes the usual P2P, RPC, REST and ZMQ ports. • ENTRYPOINT bitcoind with a pair of ZMQ publish flags. |
Is anything suspicious being introduced?
No obvious back-doors or malware are added.
The process is deliberately defensive:
- Source authenticity – the release tarball or Git tag is GPG-checked against the official maintainers’ keys, and the SHA-256 sum is enforced.
- Reproducible build chain – it compiles everything in a fresh Alpine stage; nothing is downloaded during the build except the known-good BDB image.
- Runtime image is minimal – only the stripped Bitcoin Core executables and the shared libraries they need are present; no shell, compilers, or extra scripts.
- Network surfaces are standard – the container merely exposes the ports that Bitcoin Core normally uses. RPC is not automatically opened to the world; you would still need to pass
-rpcallowip/credentials explicitly.
Things you still have to trust
- The base images (
alpine and lncm/berkeleydb). They are widely used in the Bitcoin-Docker community, but they are binary blobs you pull from Docker Hub.
- The build environment itself (your host + any CI). If an attacker controls the host, any Dockerfile can be subverted.
Aside from that normal supply-chain caveat, nothing in the Dockerfile looks like it tries to slip extra code or covert behaviour into the resulting Bitcoin Core node.
@lnliz , thanks for creating this fork !!! Let's keep it alive!
I've generated this using AI ... you may want to think of posting this to the readme , or pieces of it, to instill confidence from non-technical people on the defensive nature of the build.
What this Dockerfile does — step-by-step
preparer-basegnupg.preparer-release(default)SHA256SUMS+ its detached GPG signature and thebitcoin-$VERSION.tar.gzarchive.• Verifies the signature and that the tarball hash matches.
• Unpacks the source tree.
preparer-git(optional)v$VERSIONand verifies the tag’s signed commit.berkeleydb-prebuilt(default)lncm/berkeleydb:v4.8.30.NCso the CI build stays fast. (hub.docker.com)builder• Copies the verified source tree and the BDB libs.
• Runs CMake with wallet, CLI, utils on and GUI/tests off.
• Strips the resulting binaries and shows their SHA-256 hashes.
finalbitcoindneeds.• Copies the freshly built binaries.
• Adds an un-privileged user bitcoind and exposes the usual P2P, RPC, REST and ZMQ ports.
• ENTRYPOINT
bitcoindwith a pair of ZMQ publish flags.Is anything suspicious being introduced?
No obvious back-doors or malware are added.
The process is deliberately defensive:
-rpcallowip/credentials explicitly.Things you still have to trust
alpineandlncm/berkeleydb). They are widely used in the Bitcoin-Docker community, but they are binary blobs you pull from Docker Hub.Aside from that normal supply-chain caveat, nothing in the Dockerfile looks like it tries to slip extra code or covert behaviour into the resulting Bitcoin Core node.