File size: 574 Bytes
ee19447
0f29960
 
ee19447
 
 
0f29960
ee19447
 
0f29960
ee19447
 
0f29960
 
ee19447
197ce2c
ee19447
197ce2c
ee19447
 
0f29960
ee19447
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Base image
FROM python:3.9

# Set a non-root user
RUN useradd -m appuser
USER appuser

# Set working directory
WORKDIR /code

# Copy requirements file and install dependencies
COPY --chown=appuser ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Create storage directory with proper permissions
RUN mkdir -p /storage
RUN chown appuser:appuser /storage

# Copy application code
COPY --chown=appuser . /code

# Set the command to run the app
CMD ["streamlit", "run", "streamlit_app.py", "--server.port", "7860"]