Add Dockerfile (#13)

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/13
Co-authored-by: hiifong <f@ilo.nz>
Co-committed-by: hiifong <f@ilo.nz>
This commit is contained in:
hiifong
2025-04-06 04:06:34 +00:00
committed by hiifong
parent 0535f5bab7
commit 5bbf8e0afb
4 changed files with 114 additions and 1 deletions

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM golang:1.24-alpine AS builder
ARG VERSION
WORKDIR /build
COPY . .
RUN go mod download
RUN CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=${VERSION}" -o gitea-mcp
FROM scratch
WORKDIR /app
COPY --from=builder /build/gitea-mcp .
CMD ["./gitea-mcp", "-t", "stdio"]