Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa8c23a

Browse files
add ld flags so version is included in docker releases (#73)
1 parenta14e982 commitfa8c23a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ARG VERSION="dev"
2+
13
FROM golang:1.23.7 AS build
24
# Set the working directory
35
WORKDIR /build
@@ -6,7 +8,8 @@ COPY . .
68
# Install dependencies
79
RUN go mod download
810
# Build the server
9-
RUN CGO_ENABLED=0 go build -o github-mcp-server cmd/github-mcp-server/main.go
11+
RUN 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)" \
12+
-o github-mcp-server cmd/github-mcp-server/main.go
1013
# Make a stage to run the app
1114
FROM gcr.io/distroless/base-debian12
1215
# Set the working directory

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp