improoved version

This commit is contained in:
2025-08-11 13:01:27 +06:00
parent 3e1c4594b1
commit cc242e1192
9 changed files with 503 additions and 36 deletions

View File

@@ -2,7 +2,8 @@ FROM --platform=${BUILDPLATFORM} golang:1.24.6-alpine3.22 AS builder
ARG TARGETARCH
RUN apk add git && go install mvdan.cc/garble@latest
RUN apk add git
#&& go install mvdan.cc/garble@latest
WORKDIR /app
@@ -11,8 +12,8 @@ COPY . .
RUN echo $BUILDPLATFORM > buildplatform
RUN echo $TARGETARCH > targetarch
# RUN GOOS=linux GOARCH=$TARGETARCH go build -o /app/go-lcg .
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} garble -literals -tiny build -ldflags="-w -s" -o /app/go-lcg .
RUN GOOS=linux GOARCH=$TARGETARCH go build -ldflags="-w -s" -o /app/go-lcg .
#RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} garble -literals -tiny build -ldflags="-w -s" -o /app/go-lcg .
FROM alpine:latest