-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 668 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 668 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 1. Base Image: Python 3.9 Slim
FROM python:3.9-slim
# 2. Environment Variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# 3. Work Directory
WORKDIR /app
# 4. System Deps
# curl is REQUIRED for the HEALTHCHECK command below
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
# 5. Python Deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 6. App Code
COPY . .
# 7. Ports
EXPOSE 8501
# 8. Healthcheck
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# 9. Run
CMD ["streamlit", "run", "app_dashboard.py", "--server.address=0.0.0.0"]