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
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
FROM python:3.10
EXPOSE 8501
WORKDIR /app

# Create a non-root user with dedicated group
RUN addgroup --system appuser && \
adduser --system --no-create-home --ingroup appuser appuser

# COPY requirements.txt ./requirements.txt
# RUN pip3 install -r requirements.txt

Expand All @@ -13,5 +18,10 @@ RUN pip install poetry==1.5.0 && \

COPY . .

# Change ownership of application files to non-root user
RUN chown -R appuser:appuser /app

USER appuser

ENTRYPOINT ["streamlit"]
CMD ["run", "myapp.py"]