This is a container image which runs bitcoind
from Bitcoin Core bitcoind
. The container image runs bitcoind
.
Since the distributed bitcoind
binary uses dynamically-linked glibc, it uses the Chainguard glibc-dynamic base image. This is a distroless container, and as such has very little attack surfaces. It also has no shell, so it's not possible to execute a shell into the container.
podman pull ghcr.io/comminutus/bitcoind
podman run -it --rm ghcr.io/comminutus/bitcoind
Note that the container image does not set any other command line options other than -datadir=/var/lib/bitcoin
(see "Volumes" below).
Because bitcoind
supports so many options, it's best to configure it using a configuration file (typically bitcoin.conf). The bitcoind
command line options can be used to point to the configuration file. You can pass -conf=<CONFIG_FILE_PATH>
to use a configuration file.
A user-friendly config file generator can be found here: https://jlopp.github.io/bitcoin-core-config-generator/.
Important: A configuration file should be mounted and referenced with the -conf
option if it's not mounted in the default location. The default location bitcoind
will look at without the
need to set -conf=
is /home/nonroot/.bitcoin/bitcoin.conf.
The container's persistent data, including configuration and blockchain data is located at /var/lib/bitcoin. If you're using something other than an anonymous volume, be sure to mount it at this location.
Therefore, the simplest way to get the container up and running would be to mount your config file at /home/nonroot/.bitcoin/bitcoin.conf and forego setting the -conf
option in the command line.
Because the container uses Chainguard's image as a base, the bitcoind
process is run as a non-root user. The username and group name is nonroot
. The UID and GID are set to 65532.
The container exposes the following ports:
Port | Use |
---|---|
8332 | JSON-RPC communication; for wallets, tools, etc. |
8333 | peer-to-peer communication; for node to communicate with other nodes |
28332 | ZeroMQ port; for subscribing to specific events using a message queue |
Name | Version |
---|---|
Chainguard glibc-dynamic | latest |
Bitcoin Core | v27.1.0 |
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
This container image includes compiled Bitcoin Core binaries, which is distributed under the terms of the MIT License. The corresponding source code can be obtained here.