mirror of
https://github.com/Direct-Dev-Ru/go-lcg.git
synced 2025-11-16 09:39:56 +00:00
improoved version
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
FROM --platform=${BUILDPLATFORM} golang:1.24.6-alpine3.22 AS build
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
RUN apk add git && go install mvdan.cc/garble@latest
|
||||
# RUN apk add git
|
||||
#&& go install mvdan.cc/garble@latest
|
||||
WORKDIR /src
|
||||
ENV CGO_ENABLED=0
|
||||
COPY go.* .
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
|
||||
# RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /out/go-lcg .
|
||||
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} garble -literals -tiny build -ldflags="-w -s" -o /out/go-lcg .
|
||||
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-w -s -buildid=" -trimpath -o /out/go-lcg .
|
||||
# RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} garble -literals -tiny build -ldflags="-w -s" -o /out/go-lcg .
|
||||
|
||||
FROM scratch AS bin-unix
|
||||
COPY --from=build /out/go-lcg /lcg
|
||||
|
||||
Reference in New Issue
Block a user