A containerized Bitcoin Core for easy deployment of a Bitcoin node.
Find a file
2023-12-07 20:57:42 -05:00
.editorconfig Initial commit 2023-10-19 18:01:21 -04:00
Containerfile Update to Bitcoin Core v26.0 2023-12-07 20:57:42 -05:00
LICENSE.txt Update license 2023-10-21 09:34:09 -04:00
README.org Minor edit 2023-10-21 09:28:21 -04:00

Bitcoin Core Container

The examples in this document use the podman command. Just swap with the docker command if you are using Docker.

About

This project aims to simplify the process of hosting a Bitcoin node. Use either Podman or Docker to deploy a containerized image of Bitcoin Core. The following platforms are supported:

  • amd64
  • arm64
  • arm32v7

See the container registry for the latest image and available versions.

Usage

IMPORTANT: Since the latest tag has a high chance of introducing a breaking change, it is recommended that you pin the image using the major version tags (ie. 24, 25). This way, a manual change is required to update to the next major version. Use this opportunity to make backups in case something goes wrong.

To run a container, use either podman run or define a service in a compose.yaml file.

Run

To run with podman run:

podman run -v ./bitcoin:/home/bitcoin/.bitcoin -p 8333:8333 code.fosterhangdaan.com/foster/bitcoin-core-container:25

Compose

To define a service in a compose.yaml file:

version: "3.8"

services:
  bitcoin-core:
    image: code.fosterhangdaan.com/foster/bitcoin-core-container:25
    container_name: bitcoin-core
    restart: unless-stopped
    volumes:
      - ./bitcoin:/home/bitcoin/.bitcoin
    ports:
      # RPC
      - 8332:8332
      # P2P
      - 8333:8333
      # ZMQ block notifications
      - 28332:28332
      # ZMQ transaction notifications
      - 28333:28333

Building

To build the image:

podman build --platform='linux/amd64' .

Set the os/arch of the built image with the --platform option. It accepts one of the following values:

linux/amd64
for amd64
linux/arm64
for arm64
linux/arm/v7
for arm32v7

Contributing

Please send patches and bug reports by email to one of the maintainers. See the Core Maintainers section for a list of contacts.

Refer to this guide if you are not familiar with sending Git patches over email.

Core Maintainers

License

Licensed under the Apache License, Version 2.0. See LICENSE.txt.

Copyright

Copyright 2023 Foster Hangdaan