禁用 hyperframes 自动更新
This commit is contained in:
+11
-1
@@ -60,7 +60,17 @@ RUN npm install -g hyperframes --ignore-scripts
|
||||
# 安装 Chromium(提供系统级共享库依赖)和中文字体
|
||||
RUN apk add --no-cache chromium font-noto-cjk fontconfig \
|
||||
&& fc-cache -f
|
||||
# 下载 HyperFrames 需要的 headless-shell 浏览器
|
||||
# 下载 HyperFrames 需要的 headless-shell 浏览器。
|
||||
# hyperframes browser ensure 硬编码 Google CDN,国内下载不可靠;
|
||||
# 先用 @puppeteer/browsers CLI 从 npmmirror 镜像预置其缓存目录
|
||||
# (hyperframes 用同一套库读该缓存,命中后 browser ensure 不再下载)。
|
||||
# 版本号必须与 hyperframes 固定版本 CHROME_VERSION 一致(hyperframes 升级需同步改)。
|
||||
# 镜像下载失败时 || true 回退,browser ensure 会改走 Google CDN。
|
||||
RUN node /usr/local/lib/node_modules/hyperframes/node_modules/@puppeteer/browsers/lib/main-cli.js install \
|
||||
chrome-headless-shell@152.0.7928.2 \
|
||||
--path /root/.cache/hyperframes/chrome \
|
||||
--base-url https://npmmirror.com/mirrors/chrome-for-testing \
|
||||
|| true
|
||||
RUN npx hyperframes browser ensure
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
Reference in New Issue
Block a user