Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 7af33f0

Browse files
committed
chore: update docker file
1 parent 843beef commit 7af33f0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ RUN go mod download
1616
# Copy source code
1717
COPY . .
1818

19-
# Build the binary
19+
# Build arguments for version information
20+
ARG VERSION=dev
21+
ARG COMMIT=unknown
22+
ARG DATE=unknown
23+
24+
# Build the binary with version information
2025
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo \
21-
-ldflags='-w -s -extldflags "-static"' \
26+
-ldflags="-w -s -extldflags '-static' \
27+
-X github.com/ofkm/arcane-agent/internal/version.Version=${VERSION} \
28+
-X github.com/ofkm/arcane-agent/internal/version.Commit=${COMMIT} \
29+
-X github.com/ofkm/arcane-agent/internal/version.Date=${DATE}" \
2230
-o arcane-agent ./cmd/agent
2331

2432
# Final stage

0 commit comments

Comments
 (0)