Rework the Dockerfile to produce a proper multi-arch manifest from a single `docker buildx build --platform linux/amd64,linux/arm64`. The builder stage runs on the host's native arch ($BUILDPLATFORM) and Go cross-compiles to each requested $TARGETARCH via the Makefile's build-$TARGETARCH targets — no qemu-emulated builder, no per-arch Dockerfile duplication. VERSION/COMMIT/DATE flow from --build-arg through to the -ldflags -X injection so images stamp the same metadata as `make build` on bare metal. docker-compose.yml gains Docker Compose "profiles" (collector, aggregator, frontend) and an `env_file: .env`, mirroring vpp-maglev's pattern. All three services ship from one multi-arch image and select their binary via `command:`. Collector uses network_mode: host so UDP from host nginx on 127.0.0.1 actually reaches it; aggregator/frontend bridge-network with published ports. .env.example documents every COLLECTOR_*, AGGREGATOR_*, FRONTEND_* env var with its default plus COMPOSE_PROFILES and notes for Docker-specific cases (service DNS names, AGGREGATOR_COLLECTORS spelling). .gitignore excludes /.env so local tunables stay local. Verified: `docker buildx build --platform linux/amd64,linux/arm64` goes through cleanly from one invocation; local --load build's four binaries report version 0.9.1 with the injected commit/date. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.2 KiB
2.2 KiB