Skip to content

Commit 1d90e33

Browse files
enable docker builds with shell using different dockerfile
1 parent 08a49b0 commit 1d90e33

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Dockerfile-with-shell

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM golang:1.24.4-alpine AS build
2+
ARG VERSION="dev"
3+
4+
# Set the working directory
5+
WORKDIR /build
6+
7+
# Install git
8+
RUN --mount=type=cache,target=/var/cache/apk \
9+
apk add git
10+
11+
# Build the server
12+
# go build automatically download required module dependencies to /go/pkg/mod
13+
RUN --mount=type=cache,target=/go/pkg/mod \
14+
--mount=type=cache,target=/root/.cache/go-build \
15+
--mount=type=bind,target=. \
16+
CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=${VERSION} -X main.commit=$(git rev-parse HEAD) -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
17+
-o /bin/github-mcp-server cmd/github-mcp-server/main.go
18+
19+
# Make a stage to run the app
20+
FROM alpine:3.21
21+
RUN apk add --no-cache ca-certificates
22+
# Set the working directory
23+
WORKDIR /server
24+
# Copy the binary from the build stage
25+
COPY --from=build /bin/github-mcp-server .
26+
# Set the entrypoint to the server binary
27+
ENTRYPOINT ["/server/github-mcp-server"]
28+
# Default arguments for ENTRYPOINT
29+
CMD ["stdio"]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy