FROM python:slim WORKDIR /app # Copy just the requirements file first COPY requirements.txt . # Install requirements RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application code COPY . . EXPOSE 8080 # Set the entry point CMD ["python", "main.py"]