# 构建阶段
FROM python:3.12.8-slim-bookworm as builder

WORKDIR /build
COPY requirements.txt .
RUN pip install --user -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

# 运行阶段
FROM python:3.12.8-slim-bookworm

WORKDIR /app
COPY --from=builder /root/.local/lib/python3.12/site-packages /root/.local/lib/python3.12/site-packages
COPY . .

CMD ["python", "check.py"]