From afe14abe779ab392c6e237543af94ec3869e3f55 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Sat, 28 Mar 2026 12:26:42 -0700 Subject: [PATCH] Add Dockerfile for containerized deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two-stage Alpine build, plain HTTP on :8080 behind mc-proxy L7. Follows mcdoc pattern — no USER/VOLUME directives (rootless podman). Co-Authored-By: Claude Opus 4.6 (1M context) --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4cf7692 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM golang:1.25-alpine AS builder + +ARG VERSION=dev + +RUN apk add --no-cache git + +WORKDIR /build +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . +RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o mcq ./cmd/mcq + +FROM alpine:3.21 + +RUN apk add --no-cache ca-certificates tzdata + +COPY --from=builder /build/mcq /usr/local/bin/mcq + +WORKDIR /srv/mcq +EXPOSE 8080 + +ENTRYPOINT ["mcq"] +CMD ["server", "--config", "/srv/mcq/mcq.toml"]