fix(docker): 换 ghcr.io 源 + 清华 apt 镜像加速中国用户构建

- FROM lscr.io 改为 ghcr.io(linuxserver 镜像国内直连更稳)
- 新增 apt sources.list 层,替换为 mirrors.tuna.tsinghua.edu.cn
- apt-get 下载从 deb.debian.org 走清华源,构建速度大幅提升
This commit is contained in:
d1y
2026-06-29 18:55:02 +08:00
parent 8e15556e6f
commit 8d276c51c3

View File

@@ -1,12 +1,22 @@
# WechatOnCloud —— 在浏览器里访问服务端微信
# 基于 linuxserver 的 KasmVNC 基础镜像(多架构 amd64/arm64
# 自带 Xvfb + openbox + KasmVNC + web 客户端(3000/3001)
FROM lscr.io/linuxserver/baseimage-kasmvnc:debianbookworm
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm
# 微信本体不再在构建时下载/安装,改为运行时由面板点击下载、解压到数据卷 /config
#(见 wechat-ctl.sh。构建时只装中文字体、语言环境、下载工具以及微信运行所
# 需的全部系统库(这些需 root/apt必须 bake 进镜像)。
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
# 替换为国内镜像源(中国用户加速,海外用户可删此行)
rm -f /etc/apt/sources.list.d/debian.sources; \
printf '%s\n' \
'deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware' \
'deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware' \
'deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware' \
'deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware' \
> /etc/apt/sources.list
RUN set -eux; \
# 中文字体(否则界面/消息显示方块)+ 语言环境 + 下载/解压工具