Description
Rewrite the stub Dockerfile into a proper multi-stage build: Go backend + React frontend + Alpine final image.
Deliverables
- Stage 1:
golang:1.22-alpine — cross-compile Go backend with TARGETOS/TARGETARCH
- Stage 2:
node:22-alpine — build React frontend with npm run build
- Stage 3:
alpine:3.19 — copy binary + built UI + metadata + icon
- Update Makefile if needed for new build flow
Technical Notes
CGO_ENABLED=0 for static binary
--platform=$BUILDPLATFORM for cross-compilation
- CMD starts
/packetdeck-backend
- UI files go to
/ui directory (matching metadata.json ui.dashboard-tab.root)
- Keep extension labels (KG#83)
.hadolint.yaml for DL3048/DL3045 ignores (KG#78)
Acceptance Criteria
Wave
Wave 3 (sequential). Depends on #2, #4.
Description
Rewrite the stub Dockerfile into a proper multi-stage build: Go backend + React frontend + Alpine final image.
Deliverables
golang:1.22-alpine— cross-compile Go backend with TARGETOS/TARGETARCHnode:22-alpine— build React frontend withnpm run buildalpine:3.19— copy binary + built UI + metadata + iconTechnical Notes
CGO_ENABLED=0for static binary--platform=$BUILDPLATFORMfor cross-compilation/packetdeck-backend/uidirectory (matching metadata.jsonui.dashboard-tab.root).hadolint.yamlfor DL3048/DL3045 ignores (KG#78)Acceptance Criteria
docker build -t packetdeck:test .succeedsdocker buildx build --platform=linux/amd64,linux/arm64 .succeedsdocker extension validate packetdeck:testpassesdocker extension install packetdeck:testinstalls and opensWave
Wave 3 (sequential). Depends on #2, #4.