File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 11shamefully-hoist = true
22registry = "https://registry.npmmirror.com "
3- PUPPETEER_DOWNLOAD_BASE_URL = " https://cdn.npmmirror.com/binaries/chrome-for-testing"
3+ # PUPPETEER_DOWNLOAD_BASE_URL="https://cdn.npmmirror.com/binaries/chrome-for-testing"
Original file line number Diff line number Diff line change @@ -49,19 +49,16 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
4949# 将 bun 添加到 PATH
5050ENV PATH="/root/.bun/bin:${PATH}"
5151
52- # 安装 Node.js 依赖
53- COPY package.json bun.lock .npmrc ./
54- RUN bun install --frozen-lockfile
55-
56- # 安装 Chrome
57- VOLUME /root/.cache/puppeteer
58- # https://pptr.nodejs.cn/guides/configuration
59- # RUN pnpm dlx puppeteer browsers install chrome
60- # 我们的项目依赖本身就包含了 puppeteer,所以我们不需要 dlx 浪费时间
61- RUN bun puppeteer browsers install chrome
52+ # 安装 Chromium
53+ RUN apt-clean-install chromium-browser
6254# https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/linux/debian/dist_package_versions.json
6355RUN apt-clean-install \
6456 libasound2t64 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libdrm2 libexpat1 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libudev1 libuuid1 libx11-6 libx11-xcb1 libxcb-dri3-0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxkbcommon0 libxrandr2 libxrender1 libxshmfence1 libxss1 libxtst6
6557
58+ # 安装 Node.js 依赖
59+ COPY package.json bun.lock .npmrc ./
60+ ENV PUPPETEER_SKIP_DOWNLOAD=true
61+ RUN bun install --frozen-lockfile
62+
6663# SILI,启动!
6764CMD ["bun" , "start" ]
You can’t perform that action at this time.
0 commit comments