feat: 多架构镜像(linux/amd64 + linux/arm64,均用厂商原生包)

- 厂商按架构发包:amd64 海光麒麟 1.1.3.1010701,arm64 鲲鹏麒麟 1.1.5.1010901
  (飞腾麒麟同一文件),均为 AArch64/x86-64 原生二进制
- Dockerfile 用 buildx 的 TARGETARCH 选 deb,一次构建出双架构 manifest
- fetch-client-deb.sh 支持按架构取包 / fetch-all;CI 缓存两个 deb 并逐一校验 md5
- CI: setup-qemu 模拟 arm64 RUN;PR 用 --load 的 amd64 镜像跑冒烟,
  另加原生 arm64 runner(ubuntu-24.04-arm)跑同一套冒烟
- 新增 scripts/smoke-image.sh:起临时容器验证 Xvfb/noVNC/SOCKS5/GUI 进程
  存活 + ELF 机器码与镜像架构一致(make smoke)
- 镜像 tag 不再含客户端版本号(两架构版本不同),版本写入
  /opt/sslvpnclient/.client-version 并由 entrypoint 打印
- verify.sh 同时校验两个 deb;README/vendor 文档更新
This commit is contained in:
yuez committed 2026-11-13 17:05:04 +08:00
1 parent 5699a72bc3
commit f04ce9dcbb
10 files changed
+347 -109

No files matched your search

+13 -3
View File
@@ -3,12 +3,12 @@ IMAGE := $(or $(SECGATE_IMAGE),ghcr.io/zgs225/secgate-vpn-docker:latest)
GUI := /opt/sslvpnclient/files/bin/sslvpn
URL := http://127.0.0.1:6080/vnc.html
.PHONY: help build pull up down restart ps logs url shot verify shell window ruleset nas-deploy fetch rebuild clean
.PHONY: help build pull up down restart ps logs url shot verify smoke shell window ruleset nas-deploy fetch fetch-all rebuild multiarch clean
help: ## 显示所有可用命令
@grep -hE '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "}{printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
build: ## 本地构建图形端镜像(需要 vendor/ 里的官方海光麒麟 deb,打 ghcr 同名 tag)
build: ## 本地构建镜像(按本机架构选 vendor/ 里的 deb,打 ghcr 同名 tag)
docker compose build
pull: ## 拉取 GitHub Actions 发布到 GHCR 的镜像(不想本地构建时用它)
@@ -48,12 +48,22 @@ window: ## 列出 X 里的窗口(确认客户端窗口存在)
verify: ## 自检:X / noVNC / SOCKS5 / 客户端进程 / 窗口 / 隧道
@./scripts/verify.sh
smoke: ## 运行时冒烟:临时起容器确认 X/noVNC/SOCKS/GUI 都活着(不登录)
@./scripts/smoke-image.sh $(IMAGE)
ruleset: ## 导出 tun0 路由为 clash ipcidr ruleset(需已登录)
@./scripts/export-clash-ruleset.sh
fetch: ## 从官方下载站取图形端安装包到 vendor/(不入库)
fetch: ## 取本机架构的厂商 deb 到 vendor/(不入库)
@./scripts/fetch-client-deb.sh
fetch-all: ## 取 amd64 + arm64 两个 deb(多架构构建用)
@./scripts/fetch-client-deb.sh all
multiarch: ## 本地构建 amd64+arm64 并推送(需先 docker login;平时交给 CI)
docker buildx build --platform linux/amd64,linux/arm64 -t $(IMAGE) \
--build-arg IMAGE_VERSION=$$(git rev-parse --short HEAD) --push .
nas-deploy: ## 部署/更新到 NAS(NAS_HOST=...,端口可用 SOCKS_PORT/VNC_PORT 覆盖)
@./scripts/deploy-nas.sh