Added -trimpath to Go build flags for Docker image

This commit is contained in:
Seednode 2023-09-11 16:17:49 -05:00
parent a3f8a85d28
commit a217573483
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ ARG TARGETOS TARGETARCH
RUN CGO_ENABLED=0 \ RUN CGO_ENABLED=0 \
GOOS=$TARGETOS \ GOOS=$TARGETOS \
GOARCH=$TARGETARCH \ GOARCH=$TARGETARCH \
go build -ldflags "-s -w" -o $app \ go build -trimpath -ldflags "-s -w" -o $app \
&& upx --best --lzma $app \ && upx --best --lzma $app \
&& chmod 500 $app && chmod 500 $app