Update Dockerfile
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
@@ -28,15 +28,15 @@ COPY src/ ./src/
|
|
28 |
# Install Python dependencies
|
29 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
30 |
|
|
|
|
|
|
|
|
|
31 |
# Expose Streamlit port
|
32 |
EXPOSE 8501
|
33 |
|
34 |
# Healthcheck for Hugging Face Spaces
|
35 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
36 |
|
37 |
-
# Run Streamlit as a non-root user
|
38 |
-
RUN useradd -m appuser && chown -R appuser:appuser /app
|
39 |
-
USER appuser
|
40 |
-
|
41 |
# Run Streamlit
|
42 |
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
28 |
# Install Python dependencies
|
29 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
30 |
|
31 |
+
# Create a non-root user and set ownership
|
32 |
+
RUN useradd -m appuser && chown -R appuser:appuser /app
|
33 |
+
USER appuser
|
34 |
+
|
35 |
# Expose Streamlit port
|
36 |
EXPOSE 8501
|
37 |
|
38 |
# Healthcheck for Hugging Face Spaces
|
39 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
40 |
|
|
|
|
|
|
|
|
|
41 |
# Run Streamlit
|
42 |
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|