-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (26 loc) · 1.03 KB
/
Copy pathDockerfile
File metadata and controls
35 lines (26 loc) · 1.03 KB
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
33
34
35
FROM python:3.11-slim
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the App AND the Entrypoint Script
COPY dashboard.py .
COPY entrypoint.sh .
# --- THE MAGIC FIX ---
# This command runs INSIDE the Linux container during the build.
# It guarantees that Windows line endings are removed, no matter what your local file looks like.
RUN sed -i 's/\r$//' entrypoint.sh
# Make the script executable
RUN chmod +x entrypoint.sh
# Create the data mount point
RUN mkdir -p /app/data
EXPOSE 7770
HEALTHCHECK CMD curl --fail http://localhost:7770/_stcore/health || exit 1
# SET THE ENTRYPOINT (Runs first)
ENTRYPOINT ["./entrypoint.sh"]
# SET THE COMMAND (Runs second, passed to entrypoint)
CMD ["streamlit", "run", "dashboard.py", "--server.port=7770", "--server.address=0.0.0.0","--server.runOnSave=false","--server.fileWatcherType=none"],