Tg-bot / Dockerfile
timchick18's picture
Update Dockerfile
809c2c8 verified
Raw History Blame Contribute Delete
634 Bytes
FROM python:3.10
# Устанавливаем системные сертификаты
USER root
RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates
# Настройка пользователя
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /home/user/app
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user . .
EXPOSE 7860
# Запуск через python, чтобы сработал блок инициализации в main.py
CMD ["python", "main.py"]