From aa09d928c3e1d7bf85e4fb46ab90e9eb2b8a2d53 Mon Sep 17 00:00:00 2001 From: bjdgy Date: Mon, 29 Jan 2024 21:34:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20docker=20=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/init.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/init.sh b/docker/init.sh index 4363dcd..49cb80f 100644 --- a/docker/init.sh +++ b/docker/init.sh @@ -16,9 +16,11 @@ cd /server #go mod tidy -ldflags="-s -w -extldflags '-static' -X main.appVer=$appVer -X main.commitId=$commitId -X main.buildDate=$(date -Iseconds)" +#-extldflags '-static' -go build -o anylink -trimpath -ldflags "$ldflags" +ldflags="-s -w -X main.appVer=$appVer -X main.commitId=$commitId -X main.buildDate=$(date -Iseconds)" + +go build -v -o anylink -trimpath -ldflags "$ldflags" ls -l /server/