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 6a598b2 commit 3c01565
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions docker/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down

0 comments on commit 3c01565

Please sign in to comment.