logboard/Dockerfile

38 lines
1.0 KiB
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.

FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1
WORKDIR /app
# Устанавливаем системные зависимости для сборки некоторых Python пакетов
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
gcc \
libffi-dev \
libssl-dev \
cargo \
rustc && \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/requirements.txt
RUN python -m pip install --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt
COPY ./app /app
# Создаем пользователя и добавляем в группу docker
RUN useradd -m appuser && \
groupadd -g 999 docker || true && \
usermod -a -G docker appuser
# Создаем директорию для снимков
RUN mkdir -p /app/snapshots && chown -R appuser:appuser /app
# Скрипт для запуска с поддержкой DEBUG_MODE
#COPY start.sh /app/start.sh
RUN chmod 755 /app/start.sh
EXPOSE 9001
CMD ["/app/start.sh"]