From 9422c35f7b2b1fc55399b68f31cbd0a9a8d40dd1 Mon Sep 17 00:00:00 2001 From: itfisher Date: Wed, 29 Oct 2025 23:38:41 +0800 Subject: [PATCH] improve go build time --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3c280d7c..67c9f22d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ RUN go mod download COPY . . # Build the application -RUN CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo -o nofx . +RUN CGO_ENABLED=1 GOOS=linux go build -trimpath -ldflags="-s -w" -o nofx . # Frontend build stage FROM node:18-alpine AS frontend-builder