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.
27 lines
912 B
YAML
27 lines
912 B
YAML
services:
|
|
electrumx:
|
|
build:
|
|
# Repository root, not ./docker: the Dockerfile copies ./docker/run.sh
|
|
# and ./docker/healthy_check.sh, and those paths are resolved against the
|
|
# build context.
|
|
context: .
|
|
dockerfile: ./docker/Dockerfile
|
|
image: registry.bitdeals.org/electrumx
|
|
environment:
|
|
- COIN=Bitcoin
|
|
# ElectrumX spelling, not bitcoind's: the daemon calls this chain
|
|
# "regtest" too, but "main"/"test" there are "mainnet"/"testnet" here.
|
|
- NET=regtest
|
|
# The daemon must run with txindex=1 and txospenderindex=1.
|
|
- DAEMON_URL=http://CHANGE_ME:CHANGE_ME@bitcoind:18443
|
|
- CACHE_MB=400
|
|
ports:
|
|
# No authentication of any kind — loopback only, or nothing at all when
|
|
# the clients are containers on the same network.
|
|
- 127.0.0.1:50001:50001
|
|
volumes:
|
|
- electrumxdata:/data
|
|
|
|
volumes:
|
|
electrumxdata:
|