mirror of
https://github.com/TheSmallHanCat/flow2api.git
synced 2026-05-09 07:15:57 +08:00
36 lines
631 B
Docker
36 lines
631 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# 安装 Playwright 所需的系统依赖
|
|
RUN apt-get update && apt-get install -y \
|
|
libnss3 \
|
|
libnspr4 \
|
|
libatk1.0-0 \
|
|
libatk-bridge2.0-0 \
|
|
libcups2 \
|
|
libdrm2 \
|
|
libxkbcommon0 \
|
|
libxcomposite1 \
|
|
libxdamage1 \
|
|
libxfixes3 \
|
|
libxrandr2 \
|
|
libgbm1 \
|
|
libasound2 \
|
|
libpango-1.0-0 \
|
|
libcairo2 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# 安装 Python 依赖
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# 安装 Playwright 浏览器
|
|
RUN playwright install chromium
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["python", "main.py"]
|