Skip to content

Commit

Permalink
add a prod version for debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
david zhou authored and david zhou committed Jun 17, 2024
1 parent c004c17 commit 7b7ed7f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions debugger/Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ===== Stage 1: Base Image with Python Installed =====
FROM python:3.11-slim as base
ENV PYTHONUNBUFFERED=1

WORKDIR /app

# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# ===== Stage 2: Application Layer =====
FROM base as final

# Copy application code
COPY . .

# Set a non-root user and switch to it
RUN useradd -m myuser
USER myuser

# Set the port the app runs on
EXPOSE 8000

# Command to run your app
CMD ["python3", "-u", "src/server.py"]

0 comments on commit 7b7ed7f

Please sign in to comment.