forgejo-mcp/Containerfile

24 lines
675 B
Docker

FROM quay.io/hummingbird/go:1.26.3-builder@sha256:95239123cf489a054cfbfd361282893f0324b9a088790d1e2777a2472b8bfbe3 AS build
# Version is injected at build time; the container has no usable .git to derive
# it from (see `make container`). Defaults to "dev" for plain `podman build`.
ARG VERSION=dev
RUN dnf install -y make git && dnf clean all
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux make build VERSION="${VERSION}"
FROM quay.io/hummingbird/core-runtime:2.42@sha256:c85f5e01b7f638cb30e75a8a79d06b0cbeb44209945f62572166448bb56b53e9
WORKDIR /app
COPY --from=build /app/forgejo-mcp .
ENTRYPOINT ["/app/forgejo-mcp"]