Skip to content

Commit 082e153

Browse files
committed
fix: amend dockerfile
- Need to install deps after switching user
1 parent e9cd35e commit 082e153

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ WORKDIR /app
1010
# Copy the current directory contents into the container at /app
1111
COPY . /app
1212

13+
# Run as non-root user for security
14+
RUN useradd -m appuser
15+
USER appuser
16+
1317
# Run poetry install --without dev
1418
RUN poetry install --only main --no-root
1519

1620
# Expose the port the app runs on
1721
EXPOSE 8501
1822

19-
# Run as non-root user for security
20-
RUN useradd -m appuser
21-
USER appuser
22-
2323
# Run the dashboard
2424
# Note: ENTRYPOINT cannot be overriden by docker run command
2525
ENTRYPOINT ["poetry", "run", "streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"]

0 commit comments

Comments
 (0)