mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-09 03:18:08 +08:00
修改 docker 编译
This commit is contained in:
19
docker/init.sh
Normal file
19
docker/init.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
#TODO 本地打包时使用镜像
|
||||
if [[ $CN == "yes" ]]; then
|
||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
|
||||
export GOPROXY=https://goproxy.cn
|
||||
fi
|
||||
|
||||
#apk add gcc musl-dev
|
||||
|
||||
cd /anylink
|
||||
|
||||
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"
|
||||
|
||||
/anylink/anylink -v
|
Reference in New Issue
Block a user