Skip to content

Commit

Permalink
修改 docker 编译
Browse files Browse the repository at this point in the history
  • Loading branch information
bjdgy committed Jan 29, 2024
1 parent 9099aea commit aa09d92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docker/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down

0 comments on commit aa09d92

Please sign in to comment.