-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ff9891
commit d2d1b4b
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Use the official Python image as the base image | ||
FROM python:3.10 as builder | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy requirements file and install dependencies | ||
COPY requirements.txt . | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# --- Runtime Stage --- | ||
FROM python:3.10-slim | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Add a non-root user | ||
RUN useradd appuser && chown -R appuser /app | ||
USER appuser | ||
|
||
# Copy the rest of the application code | ||
COPY --from=builder /app . | ||
|
||
# Expose the port that the Dash app runs on | ||
EXPOSE 8050 | ||
|
||
# Run the Dash app | ||
CMD ["python", "app.py"] |