修改 docker 编译

This commit is contained in:
bjdgy 2024-01-29 21:11:40 +08:00
parent 3c015651ef
commit ef3f2aba4c
2 changed files with 3 additions and 5 deletions

View File

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

View File

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