feat: docker image for ElectrumX, configured by environment

Replaces lukechilds/electrumx, unmaintained for years. ElectrumX 2.0.0 from the
upstream tag, rocksdb, built in a venv so only the runtime library follows into
the final image.

Every variable is ElectrumX's own — the entrypoint only fills defaults and
rejects the one mistake that is expensive to diagnose: NET spelled the way
bitcoind spells it ("test" for "testnet"), which otherwise fails deep inside a
coin-class lookup. DB_ENGINE defaults to rocksdb because 2.0 made the variable
required, and peer discovery is off because this image is for private indexers.

Verified on testnet2 against the sibling bitcoind image: coin BitcoinRegtest,
db height matching daemon height at 101, Electrum protocol answering on 50001.
That run also found what the README now states — 2.x refuses to serve unless
the daemon runs with both txindex=1 and txospenderindex=1.
This commit is contained in:
2026-08-06 11:56:56 +00:00
commit a5f9d13ca4
6 changed files with 450 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
# Healthy = the server answers its own RPC. That happens once it has caught up
# with the daemon and started serving, which is what callers care about: an
# ElectrumX still building its index accepts no Electrum sessions at all.
#
# The RPC lives on localhost:8000 by default (SERVICES). Overriding SERVICES
# without an rpc:// entry leaves nothing to ask — see README, "Notes".
set -eu
exec gosu electrumx electrumx_rpc getinfo > /dev/null