Introducing a new way to review your PRs.

Read the announcement

jamaljsr / polar

One-click Bitcoin Lightning networks for local app development & testing

View on GitHub

19 documents · Updated Oct 19, 2026

docs / bundled-node-containers

Bundled node containers

The bundled node containers provide versioned Docker images for the Bitcoin and Lightning daemons that run in local development networks. Each image packages a node process with a start command, a persistent data area, and the network interfaces that the local network can use.

Container image role

The image set gives local networks a repeatable node runtime across supported host systems. The build selects a node version and target architecture. The container entrypoint then prepares the data area and starts the node or its command-line tool.

This diagram shows how a selected node version becomes a running local-network service.

flowchart LR
    V[Node version] --> B[Docker build]
    B --> I[Versioned image]
    I --> E[Entrypoint]
    E --> N[Node daemon or CLI]
    N --> D[Mounted node data]
    N --> P[Local network ports]

The images are for regtest use. They are not hardened for real funds or production service. docker/README.md states this boundary.

References: docker/README.md• L1-7 docker/…/Dockerfile• L22-33 docker/…/Dockerfile• L24-35

Image families

The bundled images cover one chain daemon, four Lightning node forms, one asset daemon, and one network simulator. The family determines the main process and the command-line tool that the entrypoint can run.

FamilyNode purposeMain processCommand-line tool
Bitcoin Core (bitcoind)Provides the local Bitcoin regtest chainbitcoindbitcoin-cli, bitcoin-tx
Core LightningProvides a Lightning node backed by Bitcoinlightningdlightning-cli
EclairProvides a JVM-based Lightning nodeEclair node launchereclair-cli
LNDProvides a Lightning nodelndlncli
Lightning Terminal (litd)Provides Lightning Terminal and its related Lightning toolslitdlitcli and bundled Lightning tools
Taproot Assets (tapd)Provides the Taproot Assets daemon for local asset networkstapdtapcli
SimLNSimulates Lightning activity from a simulation filesim-clisim-cli

The image names and version lists are published through docker/nodes.json. That file also records the Bitcoin version required by selected LND, Litd, and Tapd versions. docker/nodes.json is the source for those version relationships.

References: docker/…/Dockerfile• L3-4 docker/…/Dockerfile• L1-4 docker/…/Dockerfile• L58-70 docker/…/Dockerfile• L3-4 docker/…/Dockerfile• L3-4 docker/…/Dockerfile• L3-4 docker/…/Dockerfile• L51-75 docker/nodes.json• L1-90

Versioned image builds

The build assets use a version argument so one Dockerfile can produce many image tags. The build also targets linux/amd64 and linux/arm64, which lets the same node choice work on common desktop and Apple Silicon hosts. docker/README.md describes the multi-architecture build setup.

The image families use two broad source patterns:

Source patternFamiliesBuild result
Download a tagged release archive or start from a tagged upstream imageBitcoin Core, Core Lightning, LND, Litd, TapdA small runtime image with the selected node tools
Build from tagged source in an intermediate stageEclair, SimLNA runtime image that keeps the built node or simulator without the build toolchain

Litd and Tapd also have src.Dockerfile assets for building their binaries from upstream source. These alternate assets preserve the same runtime entrypoint and data contract as the release-based images. docker/litd/src.Dockerfile and docker/tapd/src.Dockerfile show those source-build paths.

The published image tag and the version data used by the app must stay aligned. The Docker guide describes adding a new tag to docker/nodes.json and increasing its root version so the app can discover the image update. docker/README.md documents this release path.

References: docker/README.md• L7-18 docker/README.md• L41-48 docker/README.md• L100-107 docker/README.md• L141-148 docker/README.md• L168-175 docker/README.md• L196-203 docker/README.md• L216-223 docker/README.md• L225-238 docker/…/src.Dockerfile• L1-71 docker/…/src.Dockerfile• L1-51

Entrypoint behavior

The entrypoint is the boundary between Docker and the node process. Most node entrypoints create a node user with the host user and group IDs, repair ownership of the mounted home directory, turn leading options into the default daemon command, and run node commands as that user.

This behavior keeps files created in a container usable from the host. It also allows the same image to start its daemon or to run the matching CLI. Bitcoin Core, Core Lightning, LND, Litd, and Tapd follow this shared pattern. docker/…/docker-entrypoint.sh and docker/…/docker-entrypoint.sh are representative examples.

The entrypoints have two important variations:

EntrypointSpecial behavior
Core Lightning and EclairWait briefly for Bitcoin Core before node startup
EclairConverts polar-eclair options to Java properties and replaces its public address with the container IP
SimLNBuilds the sim-cli command from environment values such as the simulation file, data directory, log level, and run time

Eclair starts through su-exec because its runtime image uses Alpine. SimLN does not use the shared node-user setup. Its entrypoint starts the simulator directly from the command assembled from its environment. docker/…/docker-entrypoint.sh and docker/…/docker-entrypoint.sh define these differences.

References: docker/…/docker-entrypoint.sh• L4-29 docker/…/docker-entrypoint.sh• L4-37 docker/…/docker-entrypoint.sh• L1-45 docker/…/docker-entrypoint.sh• L4-29 docker/…/docker-entrypoint.sh• L4-29 docker/…/docker-entrypoint.sh• L4-29 docker/…/docker-entrypoint.sh• L1-41

Persistent data and network interfaces

Each daemon image exposes a node-specific data directory as a Docker volume. The local network mounts that area so a node keeps its chain state, wallet state, or node state across container restarts. SimLN instead receives its simulation and optional data paths through environment values.

FamilyPersistent or input pathMain exposed interfaces
Bitcoin Core/home/bitcoin/.bitcoinRPC and peer ports 18443, 18444; ZMQ ports 28334, 28335
Core Lightning/home/clightningLightning peer port 9735; RPC and related service ports 9835, 8080, 10000
Eclair/home/eclairLightning peer port 9735; service port 8080
LND/home/lnd/.lndLightning peer port 9735; RPC and REST ports 10009, 8080
Litd/home/litd/.litdTerminal and Lightning service ports 8443, 10009, 9735
Tapd/home/tap/.tapdTaproot Assets RPC and peer ports 8089, 10029
SimLNSIMFILE_PATH; optional DATA_DIRNo fixed Docker port contract in this image

These paths and ports form the container contract used by the local network runtime. A change to one of them can prevent a node from finding its old state or from connecting to its peers and clients. docker/bitcoind/Dockerfile and docker/tapd/Dockerfile show the range of these contracts.

References: docker/…/Dockerfile• L27-33 docker/…/Dockerfile• L27-33 docker/…/Dockerfile• L79-101 docker/…/Dockerfile• L29-35 docker/…/Dockerfile• L22-28 docker/…/Dockerfile• L22-28 docker/…/docker-entrypoint.sh• L7-41

The Docker runtime page explains how these images fit into the wider container lifecycle. The node image management page explains how image versions are selected, discovered, and updated by the application.

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the Docker image tag, the version argument, and the matching entry in docker/nodes.json consistent.
  • Recheck the compatibility map when an LND, Litd, or Tapd version changes its required Bitcoin Core version.
  • Keep the entrypoint command names aligned with the binaries copied into the image. A mismatch can make both daemon startup and CLI use fail.
  • Preserve the data volume path when node state must survive container replacement.
  • Recheck multi-architecture release assets when a build source or upstream archive naming rule changes.
  • Update the exposed port contract and the local network settings together when a node interface changes.

Important failure modes

TriggerConsequenceGuard
A version is published without a matching image tag or nodes.json entryThe app can offer a node version that Docker cannot start or cannot discover as newUpdate the image registry and version metadata as one release step
A selected LND, Litd, or Tapd version is paired with an incompatible Bitcoin Core versionThe node may fail to connect to the chain daemon or may behave unpredictablyUse the compatibility map in docker/nodes.json
A mounted data directory is owned by a container-only user IDThe host or a later container cannot read or write node statePass the host IDs through USERID and GROUPID and keep ownership setup in the entrypoint
A node command is passed as options but the entrypoint does not map those options to the daemonThe container starts the wrong command or exits before the node runsKeep the default command and option mapping aligned
A build uses an archive or source target that does not exist for one CPU architectureThe multi-architecture image build fails or one host cannot pull a usable imageCheck upstream release names for every supported architecture
A node port or data path changes without a matching runtime changePeers or clients cannot connect, or an existing node appears to have lost its stateTreat the Dockerfile contract and local network settings as one change

Key files

FileWhy to read it
docker/README.mdDefines the image purpose, multi-architecture build approach, published tags, and update flow
docker/nodes.jsonMaps node families to available versions and records key Bitcoin compatibility rules
docker/bitcoind/DockerfileShows the base chain image contract and Bitcoin release packaging
docker/clightning/DockerfileShows the image built on the upstream Core Lightning base image
docker/eclair/DockerfileShows the source-build path and the Eclair runtime contract
docker/lnd/DockerfileShows release archive packaging for LND and its CLI
docker/litd/DockerfileShows the release-based Lightning Terminal image
docker/litd/src.DockerfileShows the alternate source build for Lightning Terminal
docker/tapd/DockerfileShows the release-based Taproot Assets image
docker/tapd/src.DockerfileShows the alternate source build for Taproot Assets
docker/simln/DockerfileShows the multi-architecture SimLN build and small runtime image
docker/…/docker-entrypoint.shShows how each container turns Docker input into a running daemon, CLI, or simulator