Files
czip-api/Dockerfile
2026-04-19 23:51:17 +08:00

26 lines
596 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM python:3.11-slim
WORKDIR /app
# 1. 安装系统编译依赖qqwry-py3 需要编译)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libffi-dev \
libssl-dev \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# 2. 复制并安装 Python 依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 3. 复制源码 & 纯真库
COPY qqwry.dat app.py ./
# 4. 默认端口 5000可 docker run -e PORT=8080 覆盖
ENV PORT=5000
EXPOSE ${PORT}
# 5. 直接 python 启动
CMD ["python", "app.py"]