Complete the code to specify the base image in a Dockerfile for a Flask app.
FROM [1]The base image python:3.12-slim is a lightweight Python image suitable for Flask apps.
Complete the code to copy the Flask app files into the Docker image.
COPY [1] /appCopying . copies all files from the current directory into the image's /app folder.
Fix the error in the Dockerfile command to install dependencies.
RUN pip install -r [1]The dependencies are listed in requirements.txt, so pip installs from that file.
Fill both blanks to set the working directory and expose the Flask app port.
WORKDIR [1] EXPOSE [2]
The working directory is set to /app where the app files are copied. Flask's default port is 5000, so we expose that.
Fill all three blanks to define the command that runs the Flask app inside the container.
CMD ["[1]", "[2]", "[3]"]
The command runs Python with the script app.py to execute the Flask app.