Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# syntax=docker/dockerfile:1
FROM simplyblock/simplyblock:base_image

# Create a non-root user
RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser

WORKDIR /app

COPY requirements.txt .
Expand All @@ -9,4 +12,8 @@ RUN pip3 install -r requirements.txt

COPY . /app

RUN python setup.py install
# Fix ownership to non-root user
RUN chown -R appuser:appgroup /app && \
python setup.py install

USER appuser
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work in that order? I only ever had the USER before chown, but if it works, great :)

Loading