A tiny Prometheus exporter for Docker container metrics, written in Rust for ARM64 homelabs running cgroup v2 — and the fix for cAdvisor's zero-memory bug on Raspberry Pi 5.
📖 Full documentation: docker-exporter.tech
cAdvisor reports zero for container_memory_working_set_bytes on Raspberry Pi 5 (ARM64 + cgroup v2) — a known, upstream-unfixed bug. docker-exporter reads the Docker stats API directly, computes the working set correctly on both cgroup versions, talks to the socket read-only, runs non-root, and idles around 7 MiB of RAM. Metric names are cAdvisor-compatible, so existing Grafana dashboards work unchanged.
docker run -d \
--name docker-exporter \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-p 9713:9713 \
--restart unless-stopped \
ghcr.io/dlepaux/docker-exporter:latestThen scrape http://localhost:9713/metrics. Image is published for linux/amd64 and linux/arm64.
- Correct memory working set on cgroup v1 and v2 (
usage − inactive_fileon v2,usage − cacheon v1) — the number cAdvisor zeroes on ARM64. - ~9 MB image, ~7 MiB RAM, < 1% CPU — a single static binary on distroless.
- Read-only Docker socket, non-root (UID 65532), no privileged mode.
- On-demand collection — no background loop; 5 s per-container timeout.
- Per-container CPU, memory, network, block I/O, state, health, and lifecycle metrics.
- Glob-aware container exclusion via
EXCLUDE_CONTAINERS.
Everything lives at docker-exporter.tech:
- Installation · Configuration · Metrics reference
- Prometheus & Grafana · Architecture · Troubleshooting
- Why cAdvisor breaks on Raspberry Pi 5 · docker-exporter vs cAdvisor
cargo build # debug build
cargo test # unit + integration tests (some need a local Docker daemon)
cargo clippy # lints
cargo fmt # format (CI enforces `cargo fmt --check`)
cargo build --release # release binaryTests that need a Docker daemon skip themselves when the socket isn't reachable, so cargo test is safe to run anywhere.
Found a vulnerability? Follow the disclosure policy in SECURITY.md — please do not open a public issue.