test / Dockerfile
22333Misaka's picture
Upload 5 files
efd8f02 verified
raw
history blame contribute delete
482 Bytes
FROM python:3.10-slim-bullseye
# 安装必要的系统依赖
# DrissionPage 需要浏览器才能工作
RUN apt-get update && apt-get install -y \
chromium \
chromium-driver \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# 复制项目文件
COPY . .
# 安装 Python 依赖
RUN pip install --no-cache-dir \
flask \
python-dotenv \
DrissionPage \
requests
# 暴露端口
ENV PORT=7860
EXPOSE 7860
# 运行应用
CMD ["python", "app.py"]