Skip to content

Commit

Permalink
Create Dockerfile.dash
Browse files Browse the repository at this point in the history
  • Loading branch information
lfunderburk committed May 18, 2023
1 parent 0ff9891 commit d2d1b4b
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Dockerfile.dash
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"]

0 comments on commit d2d1b4b

Please sign in to comment.