Skip to content

Commit

Permalink
修复 alpine:3.19 下 iptables 不生效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
bjdgyc committed Feb 21, 2024
1 parent 0e6e4e5 commit 70f3e43
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion docker/init_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
3 changes: 2 additions & 1 deletion docker/init_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70f3e43

Please sign in to comment.