Dockerfile 433 B

12345678910111213
  1. FROM registry.cn-hangzhou.aliyuncs.com/stuuudy/python:3.11-slim AS base
  2. WORKDIR /app
  3. COPY requirements.txt ./
  4. RUN pip install --no-cache-dir --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple/ \
  5. && pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
  6. COPY app ./app
  7. COPY .env ./.env
  8. EXPOSE 8000
  9. CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]