Files
asepharyana-hub/infra/docker/dashboard.Dockerfile
T
asepharyana afae724f6b refactor(infra): server-side SVG dashboard with Go
- Replace nginx+Chart.js client-side dashboard with Go server
- Server-side rendered SVG charts (donut, line charts)
- Direct Docker socket integration via Go stdlib
- Embedded HTML template via //go:embed
- Minimal scratch image (~9MB total)
- Remove nginx.conf and client-side Chart.js
2026-07-22 18:35:29 +07:00

12 lines
304 B
Docker

# ── Build stage ──
FROM golang:1.24-alpine AS builder
WORKDIR /build
COPY infra/dashboard/ ./
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o dashboard .
# ── Runtime (scratch — ~7MB total) ──
FROM scratch
COPY --from=builder /build/dashboard /dashboard
EXPOSE 8080
CMD ["/dashboard"]