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 3c01565 commit ef3f2ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ COPY ./LICENSE /app/LICENSE
COPY ./home /app/home

#TODO 本地打包时使用镜像
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN apk add --no-cache bash iptables iproute2\
&& chmod +x /app/docker_entrypoint.sh \
&& ls /app
Expand Down
6 changes: 2 additions & 4 deletions docker/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ uname -a

cd /server

go mod tidy
#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 ef3f2ab

Please sign in to comment.