# Use the official Python 3.8 slim image as the base image FROM python:3.8-slim # Set the working directory within the container WORKDIR /api-flask # Upgrade pip and install Python dependencies COPY ./requirements.txt /api-flask/ RUN pip3 install --upgrade pip RUN pip install --no-cache-dir -r requirements.txt # Expose port 5000 for the Flask application EXPOSE 5000 # Define the command to run the Flask application using Gunicorn # CMD ["gunicorn", "application:app", "-b", "0.0.0.0:5000", "-w", "4"] CMD ["python", "flask_backend.py"]