Skip to content

Commit fa8c23a

Browse files
add ld flags so version is included in docker releases (#73)
1 parent a14e982 commit fa8c23a

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)
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