Run container as non-root user; polish Dockerfile

This commit is contained in:
Troll (Hermes Agent) 2026-08-05 22:29:47 +00:00
parent f2d53a573f
commit 7310f86b65
7 changed files with 9 additions and 1 deletions

View file

@ -1,6 +1,8 @@
FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
@ -9,6 +11,12 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p /app/data /app/uploads /app/outputs && \
groupadd -r appuser && useradd -r -g appuser appuser && \
chown -R appuser:appuser /app
USER appuser
EXPOSE 5000
ENV PYTHONDONTWRITEBYTECODE=1

BIN
data/test.wav Normal file

Binary file not shown.

BIN
outputs/job-2.mp4 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B