修改 docker 编译

This commit is contained in:
bjdgy 2024-01-29 20:59:34 +08:00
parent 6a598b2570
commit 3c015651ef
2 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,8 @@ COPY docker/init.sh /tmp/init.sh
COPY server/ /server/
COPY web/ui /server/ui
RUN sh /tmp/init.sh
RUN apk add gcc musl-dev bash
RUN bash /tmp/init.sh
# anylink

View File

@ -15,8 +15,10 @@ uname -a
cd /server
go mod tidy
go build -o anylink -trimpath \
-ldflags "-s -w -extldflags '-static' -X main.appVer=$appVer -X main.commitId=$commitId -X main.buildDate=$buildDate"
go build -o anylink -trimpath
# -ldflags "-s -w -extldflags '-static' -X main.appVer=$appVer -X main.commitId=$commitId -X main.buildDate=$buildDate"
ls -l /server/