workshop/Dockerfile

22 lines
830 B
Docker
Raw Permalink 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.11-slim
# Устанавливаем системные зависимости для работы с анимацией и SQLite
RUN apt-get update && apt-get install -y \
libmagic1 \
&& rm -rf /var/lib/apt/lists/*
# Устанавливаем рабочую директорию
WORKDIR /app
# Копируем файлы приложения в контейнер
COPY . /app
# Устанавливаем необходимые Python библиотеки
RUN pip install --no-cache-dir -r requirements.txt
# Открываем порты для работы приложения
EXPOSE 5000
# Запускаем приложение
CMD ["hypercorn", "main:app", "--bind", "0.0.0.0:5000"]