修改 docker 编译

This commit is contained in:
bjdgy 2024-01-29 21:34:03 +08:00
parent 9099aea122
commit aa09d928c3
1 changed files with 4 additions and 2 deletions

View File

@ -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/