FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS builder ARG TARGETARCH=amd64 WORKDIR /app COPY go.mod go.sum ./ RUN go mod download COPY . ./ RUN CGO_ENABLED=0 GOARCH=$TARGETARCH go build -ldflags="-s -w" -o git-summarizer ./cmd/git-summarizer FROM alpine:3.20 # Static labels LABEL org.opencontainers.image.title="git-summarizer" \ org.opencontainers.image.description="AI-powered git change summarizer using agentic tool-calling with self-hosted LLMs" \ org.opencontainers.image.licenses="MIT" \ org.opencontainers.image.authors="Evan Jarrett" \ org.opencontainers.image.source="https://tangled.org/evan.jarrett.net/git-summarize" \ org.opencontainers.image.documentation="https://tangled.org/evan.jarrett.net/git-summarize" # Dynamic labels are passed via --label flags at build time RUN apk add --no-cache ca-certificates COPY --from=builder /app/git-summarizer /usr/local/bin/ RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh EXPOSE 8000 ENTRYPOINT ["git-summarizer"]