Flexible multi-arch (amd & amd64) Bitcoin node Docker image
Go to file
2020-03-18 22:57:08 +08:00
.github/workflows Update GH Release action 2020-03-18 21:53:13 +08:00
0.15 Add v0.15.3 for giggles 2020-03-14 21:15:15 +08:00
0.16 Only add relevant binaries to final image 2020-03-14 20:59:40 +08:00
0.17 Only add relevant binaries to final image 2020-03-14 20:59:40 +08:00
0.18 Only add relevant binaries to final image 2020-03-14 20:59:40 +08:00
0.19 v0.19.0.1 2020-03-18 22:57:08 +08:00
scripts Put together an updated README 2020-03-18 22:32:20 +08:00
.gitignore init commit 2019-02-06 19:55:51 +07:00
LICENSE apache to MIT 2019-02-07 14:57:23 +07:00
README.md Remove lnd line… 2020-03-18 22:34:25 +08:00

lncm/bitcoind

Build Status gh_last_release_svg Docker Image Size Docker Pulls Count

This repo builds bitcoind in an auditable way, and packages it into a minimal Docker containers provided for various CPU architectures.

The work here was initially based on ruimarinho/docker-bitcoin-core, but has significantly diverged since.

Details

  • All git-tags (and most commits) are signed by D8CA1776EB9265491D07CE67F546ECBEA809CB18
  • All git-tags (and most commits) are opentimestamps-ed
  • All builds aim to be maximally auditable. After git tag push, the entire process is automated, with each step printed, and the code aiming to be easy to follow
  • All builds are based on Alpine
  • Cross-compiled builds are done using our (also auditable) qemu
  • To fit build and complete make check test suite, BerkeleyDB is build separately here
  • Each build produces binaries for: amd64, arm64v8, and arm32v7
  • All architectures are aggregated under an easy-to-use Docker Manifest
  • All git-tags are build automatically, and with an auditable trace
  • Each successful build of a git tag pushes result Docker image to Docker Hub
  • Images pushed to Docker Hub are never deleted (even if lnd version gets overriden, previous one is preserved)
  • All final images are based on Alpine for minimum base size
  • All binaries are stripped
  • Each git-tag build is tagged with a unique tag number
  • Each minor version is stored in a separate directory (for the ease of backporting patches)

NOTE: ZMQ block and tx ports are set to 28332 and 28333 respectively.

Tags

NOTE: For an always up-to-date list see: https://hub.docker.com/r/lncm/bitcoind/tags

  • v0.19.1
  • v0.19.0.1
  • v0.19.0
  • v0.18.1
  • v0.17.2
  • v0.16.3
  • v0.15.2

Usage

Pull

First pull the image from Docker Hub:

docker pull lncm/bitcoind:v0.19.1 

NOTE: Running above will automatically choose native architecture of your CPU.

Or, to pull a specific CPU architecture:

docker pull lncm/bitcoind:v0.19.1-arm64v8

Start

Then to start bitcoind, run:

docker run  -it  --rm  --detach \
    -v ~/.bitcoin:/data/.bitcoin \
    -p 8332:8332 \
    -p 8333:8333 \
    -p 28332:28332 \
    -p 28333:28333 \
    --name bitcoind \
    lncm/bitcoind:v0.19.1

That will run bitcoind such that:

  • all data generated by the container is stored in ~/.bitcoin on your host machine,
  • port 8332 will be reachable for the RPC communication,
  • port 8333 will be reachable for the peer-to-peer communication,
  • port 28332 will be reachable for ZMQ block notifications,
  • port 28333 will be reachable for ZMQ transaction notifications,
  • created container will get named bitcoind,
  • within the container, bitcoind binary is run as unprivileged user bitcoind (UID=1000),
  • that command will run the container in the background and print the ID of the container being run.

Interact

To issue any commands to a running container, do:

docker exec -it bitcoind BINARY COMMAND

Where:

  • BINARY is either bitcoind, bitcoin-cli, bitcoin-tx, (or bitcoin-wallet on v0.18+) and
  • COMMAND is something you'd normally pass to the binary

Examples:

docker exec -it bitcoind bitcoind --help
docker exec -it bitcoind bitcoind --version
docker exec -it bitcoind bitcoin-cli --help
docker exec -it bitcoind bitcoin-cli -getinfo
docker exec -it bitcoind bitcoin-cli getblockcount