Dockerfile 570 B

12345678910111213141516171819202122
  1. FROM python:3.12-slim
  2. WORKDIR /app
  3. ENV POETRY_VIRTUALENVS_CREATE=false \
  4. PYTHONUNBUFFERED=1 \
  5. PYTHONDONTWRITEBYTECODE=1
  6. RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
  7. && pip install --no-cache-dir poetry
  8. COPY pyproject.toml poetry.lock ./
  9. RUN poetry source add --priority=primary tsinghua https://pypi.tuna.tsinghua.edu.cn/simple || true \
  10. && poetry lock \
  11. && poetry install --no-root --no-interaction --no-ansi
  12. COPY . .
  13. EXPOSE 48001
  14. CMD ["uvicorn", "alien_store.main:app", "--host", "0.0.0.0", "--port", "48001"]