Docker Linux E2E
Isolated bridge network for validating the Linux agent against a real control server without installing the agent on the host.
Topology
┌──────────────── docker network: e2e-internal (no host egress) ────────────────┐
│ agent container ──WS──► server container :8989 │
└──────────────────────────────────────────────────────────────────────────────┘
│
server also on `default`
▼
Stratum pool (internet)
- Agent — only on
e2e-internal(internal: true). Cannot reach the internet; mines via C2 jobs from the server. - Server — on
e2e-internal+ default bridge so it can reach upstream Stratum and expose18989to the host dashboard.
Prerequisites
- Docker Engine 24+ with
docker compose - ~2 GB free disk for golang build images
RandomX uses the pure-Go go-randomx module — no CGO or librandomx required in the agent image.
Quick start
From repo root:
docker compose -f docker/docker-compose.yml up --build
Watch server logs for [WS] Agent auth and [Pool] job lines. Watch agent logs:
docker compose -f docker/docker-compose.yml logs agent
Verify hashrate
- Dashboard — open
http://127.0.0.1:18989, logintestuser/testpass, check Fleet Roster fordocker-e2e-linux. - Stats fields — node card should show
hashrate_15s,hashrate_1m,hashrate_15m, and share counters after ~30s. - Server logs —
docker compose -f docker/docker-compose.yml logs -f server— look for agent stats WS messages and share submissions if enabled. - Agent log —
docker compose -f docker/docker-compose.yml exec agent cat /tmp/miner.log(if present).
CI mining proof (automated)
Every push can prove the Linux agent connects and reports hashrate > 0 without manual dashboard checks.
# Linux / macOS / GitHub Actions
scripts/ci-docker-mining.sh
# Windows (Docker Desktop)
.\scripts\ci-docker-mining.ps1
The script:
docker compose -f docker/docker-compose.yml up --build -d- Waits up to 3 minutes for
GET /api/v1/health+ agent online - Asserts via
GET /api/v1/agents(Basic auth) orGET /api/v1/dashboard/stats— online agent withhashrate_15s|1m|15m > 0 - Tears down compose (
down --rmi local -v)
GitHub Actions: .github/workflows/ci-docker-mining.yml (ubuntu-latest; Docker preinstalled).
Teardown
docker compose -f docker/docker-compose.yml down --rmi local -v
Fixed test credentials
| Item | Value |
|---|---|
| Fleet secret | e2e-docker-fleet-secret-fixed001 |
| Dashboard user | testuser / testpass |
| Host port | 18989 → server 8989 |
| Test XMR wallet | 85JfUA9uyBZ2Kzv4ctoURyUYoYgpEu5QjQ8xSdiapFX8TpBHXkHwHQhBkxUxmoFKU85NH4dnSRBbiL8wSvcVmRqg4Wc9Trm |
The wallet is baked into docker/data/config.json (server pool login) and docker/agent-builtin.go (agent fallback). It is a public test address for E2E only — not for production mining.
Troubleshooting
| Symptom | Check |
|---|---|
| Agent exits immediately | logs agent — wallet/server URL baked in docker/agent-builtin.go |
| Auth rejected | fleet_secret must match in docker/data/config.json and docker/agent-builtin.go |
| Hashrate 0 forever | Server pool connectivity — server needs default-network egress |
| CI proof times out | docker compose logs agent server; allow 3 min after up -d; pool may be slow |
| Idle mode never mines | Use mining_mode: always in docker builtin (default here) |
Host server alternative
To point the agent container at a server on the host instead of the server service, change ServerURL in docker/agent-builtin.go to http://host.docker.internal:8989 (Docker Desktop) and run only the agent service.