Добавлен non-root Dockerfile backend

This commit is contained in:
2026-08-02 22:47:10 +03:00
parent 561ca56996
commit 7186ae0e58
+18
View File
@@ -0,0 +1,18 @@
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt \
&& groupadd --system panel \
&& useradd --system --gid panel --home-dir /app panel
COPY app ./app
RUN chown -R panel:panel /app
USER panel
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]