| 1234567891011121314151617181920212223242526272829303132 | # syntax=docker/dockerfile:1FROM registry.cn-hangzhou.aliyuncs.com/stuuudy/python:3.11-slim AS baseENV PYTHONDONTWRITEBYTECODE=1 \    PYTHONUNBUFFERED=1 \    PIP_DISABLE_PIP_VERSION_CHECK=1 \    PIP_NO_CACHE_DIR=1WORKDIR /app# System deps# RUN apt-get update -y && apt-get install -y --no-install-recommends \#     build-essential curl && \#     rm -rf /var/lib/apt/lists/*# Install Python deps first (better layer caching)COPY requirements.txt .RUN pip install --no-cache-dir --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/# Copy sourceCOPY app ./appCOPY README.md .# Optionally copy .env at build time (usually mounted at runtime)COPY .env .EXPOSE 8000CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
 |