Run container as non-root user; polish Dockerfile
This commit is contained in:
parent
f2d53a573f
commit
7310f86b65
7 changed files with 9 additions and 1 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -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
BIN
data/test.wav
Normal file
Binary file not shown.
BIN
outputs/job-2.mp4
Normal file
BIN
outputs/job-2.mp4
Normal file
Binary file not shown.
BIN
uploads/1785968979-f0b32b4d-aud-Batch_2.wav
Normal file
BIN
uploads/1785968979-f0b32b4d-aud-Batch_2.wav
Normal file
Binary file not shown.
BIN
uploads/1785968979-f0b32b4d-img-Batch_2.jpg
Normal file
BIN
uploads/1785968979-f0b32b4d-img-Batch_2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
uploads/1785968984-fb77a33d-aud-Error_Test.wav
Normal file
BIN
uploads/1785968984-fb77a33d-aud-Error_Test.wav
Normal file
Binary file not shown.
BIN
uploads/1785968984-fb77a33d-img-Error_Test.png
Normal file
BIN
uploads/1785968984-fb77a33d-img-Error_Test.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 109 B |
Loading…
Add table
Add a link
Reference in a new issue