| # Use a lightweight Python image as the base | |
| FROM python:3.11-slim | |
| # Set the working directory inside the container | |
| WORKDIR /app | |
| # Copy requirements file first for better layer caching | |
| COPY requirements.txt /app/ | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all other files to the container | |
| COPY . /app |