Flow2API / Dockerfile
StarrySkyWorld's picture
Create Dockerfile
aa2ed3e verified
raw
history blame
706 Bytes
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 \
git \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/TheSmallHanCat/flow2api.git .
# 安装 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"]