This commit is contained in:
2026-04-04 11:03:21 +10:00
parent 174f998561
commit c5ea0b8e8b

View File

@@ -2,18 +2,17 @@ FROM python:3.11-slim
WORKDIR /app WORKDIR /app
# Установка зависимостей в один слой + очистка кэша RUN apt-get update && apt-get install -y --no-install-recommends curl \
RUN apt-get update && \ && rm -rf /var/lib/apt/lists/*
apt-get install -y --no-install-recommends curl && \
rm -rf /var/lib/apt/lists/* && \ RUN useradd -m -s /bin/bash appuser
pip install --no-cache-dir -r requirements.txt && \
pip cache purge COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Копирование исходников
COPY . . COPY . .
RUN useradd -m -s /bin/bash appuser && \ RUN chown -R appuser:appuser /app
chown -R appuser:appuser /app
USER appuser USER appuser