# # Use an official Python image # FROM python:3.10 # # Set working directory inside the container # WORKDIR /app # # Copy all files into the container # COPY . /app # # Install dependencies # RUN pip install --upgrade pip # RUN pip install -r requirements.txt # # Expose the default port # EXPOSE 5000 # # Run the Flask app # CMD ["python", "app.py"] # Use a lightweight Python image FROM python:3.9-slim # Set working directory WORKDIR /app # Copy requirements and install them COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app code COPY . . # Expose the port used by Flask EXPOSE 5000 # Start the Flask app CMD ["python", "app.py"]