Files
mcat/Dockerfile
Kyle Isom 7761a5c5a4 Fix Dockerfile for rootless podman
Remove USER and VOLUME directives (cause layer unpacking failures in
rootless podman). Add ARG VERSION for build-time injection. Follow the
standard mcdoc/mcq Dockerfile pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:26:30 -07:00

25 lines
468 B
Docker

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 mcat ./cmd/mcat
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata
COPY --from=builder /build/mcat /usr/local/bin/mcat
WORKDIR /srv/mcat
EXPOSE 8443
ENTRYPOINT ["mcat"]
CMD ["server", "--config", "/srv/mcat/mcat.toml"]