mirror of
https://github.com/Direct-Dev-Ru/go-lcg.git
synced 2025-11-16 01:29:55 +00:00
improoved version
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user