Skip to content

Commit c4f0122

Browse files
genz27warp-agent
andcommitted
fix: 简化 Dockerfile,移除 Playwright 浏览器安装
Co-Authored-By: Warp <agent@warp.dev>
1 parent 6775d69 commit c4f0122

1 file changed

Lines changed: 2 additions & 33 deletions

File tree

Dockerfile

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,9 @@ FROM python:3.11-slim
22

33
WORKDIR /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 依赖
296
COPY 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

409
COPY . .
4110

0 commit comments

Comments
 (0)