vdkch/Dockerfile
2025-02-15 13:52:05 +03:00

22 lines
758 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.

# Используем официальный образ Python
FROM python:3.9-slim
# Устанавливаем системные зависимости
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc python3-dev && \
rm -rf /var/lib/apt/lists/*
# Рабочая директория
WORKDIR /app
# Сначала копируем только зависимости
COPY requirements.txt .
# Устанавливаем зависимости с кэшированием
RUN pip install --no-cache-dir -r requirements.txt
# Копируем остальные файлы
COPY . .
# Команда для запуска (замените на вашу)
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]