From 98cfc39b35b8b4bd9507658a02419c808605556a Mon Sep 17 00:00:00 2001 From: Sam Morrow Date: Thu, 20 Mar 2025 14:38:49 +0100 Subject: [PATCH] chore: add dockerfile --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..6b66afb6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM golang:1.23.7 AS build +# Set the working directory +WORKDIR /build +# Copy the current directory contents into the working directory +COPY . . +# Install dependencies +RUN go mod download +# Build the server +RUN CGO_ENABLED=0 go build -o github-mcp-server cmd/github-mcp-server/main.go +# Make a stage to run the app +FROM gcr.io/distroless/base-debian12 +# Set the working directory +WORKDIR /server +# Copy the binary from the build stage +COPY --from=build /build/github-mcp-server . +# Command to run the server +CMD ["./github-mcp-server", "stdio"]