From 70f3e4302c4e5e61132c2fe2dca51049f0fe5ba3 Mon Sep 17 00:00:00 2001 From: bjdgyc Date: Wed, 21 Feb 2024 11:30:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20alpine:3.19=20=E4=B8=8B=20?= =?UTF-8?q?iptables=20=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_docker.sh | 6 ++++++ docker/init_build.sh | 3 ++- docker/init_release.sh | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build_docker.sh b/build_docker.sh index 40ad809c..501210ef 100644 --- a/build_docker.sh +++ b/build_docker.sh @@ -16,3 +16,9 @@ docker buildx build -t bjdgyc/anylink:latest --progress=plain --build-arg CN="ye echo "docker tag latest $ver" docker tag bjdgyc/anylink:latest bjdgyc/anylink:$ver + +exit 0 + +docker tag bjdgyc/anylink:latest registry.cn-qingdao.aliyuncs.com/bjdgyc/anylink:latest + +docker push registry.cn-qingdao.aliyuncs.com/bjdgyc/anylink:latest diff --git a/docker/init_build.sh b/docker/init_build.sh index 91e3705c..afe46cd6 100644 --- a/docker/init_build.sh +++ b/docker/init_build.sh @@ -24,7 +24,8 @@ extldflags="-static" ldflags="-s -w -X main.appVer=$appVer -X main.commitId=$commitId -X main.buildDate=$(date -Iseconds) \ -extldflags \"$extldflags\" " -CGO_ENABLED=1 go build -o anylink -trimpath -ldflags "$ldflags" +export CGO_ENABLED=1 +go build -o anylink -trimpath -ldflags "$ldflags" ls -lh /server/ diff --git a/docker/init_release.sh b/docker/init_release.sh index 3890cc3e..5a97f5f4 100644 --- a/docker/init_release.sh +++ b/docker/init_release.sh @@ -10,7 +10,8 @@ fi #兼容老版 iptables apk add --no-cache iptables iptables-legacy -rm /sbin/iptables && ln -s /sbin/iptables-legacy /sbin/iptables +rm /sbin/iptables +ln -s /sbin/iptables-legacy /sbin/iptables apk add --no-cache ca-certificates bash iproute2 tzdata chmod +x /app/docker_entrypoint.sh