use buildinfo for version information

This commit is contained in:
Vladislav Yarmak
2025-11-20 01:43:07 +02:00
parent d50d7a41f9
commit 158243ea14
4 changed files with 13 additions and 22 deletions
+1 -3
View File
@@ -1,11 +1,9 @@
FROM --platform=$BUILDPLATFORM golang:1 AS build
ARG GIT_DESC=undefined
WORKDIR /go/src/github.com/Snawoot/opera-proxy
COPY . .
ARG TARGETOS TARGETARCH
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -a -tags netgo -ldflags '-s -w -extldflags "-static" -X main.version='"$GIT_DESC"
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -a -tags netgo -ldflags '-s -w -extldflags "-static"'
ADD https://curl.haxx.se/ca/cacert.pem /certs.crt
RUN chmod 0644 /certs.crt