# Use an official Python runtime as a parent image FROM python:3.8-slim # Set the working directory inside the container WORKDIR /app # Copy the current directory contents into the container at /app COPY . /app # Install Flask RUN pip install --no-cache-dir flask # Set the environment variable for Flask ENV FLASK_APP=app.py ENV FLASK_RUN_HOST=0.0.0.0 # Expose port 5000 for the Flask app EXPOSE 5000 # Run the Flask application CMD ["flask", "run", "--host=0.0.0.0", "--port=5000"]