File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,40 +2,9 @@ FROM python:3.11-slim
22
33WORKDIR /app
44
5- # 使用清华镜像源加速 apt (Debian bookworm)
6- RUN sed -i 's|deb.debian.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian.sources \
7- && sed -i 's|security.debian.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian.sources
8-
9- # 安装 Playwright 所需的系统依赖
10- RUN apt-get update && apt-get install -y \
11- libnss3 \
12- libnspr4 \
13- libatk1.0-0 \
14- libatk-bridge2.0-0 \
15- libcups2 \
16- libdrm2 \
17- libxkbcommon0 \
18- libxcomposite1 \
19- libxdamage1 \
20- libxfixes3 \
21- libxrandr2 \
22- libgbm1 \
23- libasound2 \
24- libpango-1.0-0 \
25- libcairo2 \
26- && rm -rf /var/lib/apt/lists/*
27-
28- # 安装 Python 依赖(使用清华 PyPI 镜像)
5+ # 安装 Python 依赖
296COPY requirements.txt .
30- RUN pip install --no-cache-dir -r requirements.txt \
31- -i https://pypi.tuna.tsinghua.edu.cn/simple/ \
32- --trusted-host pypi.tuna.tsinghua.edu.cn
33-
34- # 设置 Playwright 下载镜像(使用 npmmirror)
35- ENV PLAYWRIGHT_DOWNLOAD_HOST=https://registry.npmmirror.com/-/binary/playwright
36-
37- # 安装 Playwright 浏览器
38- RUN playwright install chromium
7+ RUN pip install --no-cache-dir --root-user-action=ignore -r requirements.txt
398
409COPY . .
4110
You can’t perform that action at this time.
0 commit comments