Complete the Dockerfile line to specify the base image for the build stage.
FROM [1] AS builderThe base image for the build stage is python:3.12-slim to have Python and a small image size.
Complete the command to copy source code into the build stage.
COPY [1] /app/The current directory . is copied into /app/ in the container.
Fix the error in the command that installs dependencies in the build stage.
RUN pip install -r [1]The correct filename for Python dependencies is requirements.txt.
Fill both blanks to copy only the final app files from the build stage to the final image.
FROM python:3.12-slim WORKDIR /app COPY --from=[1] [2] /app/
The final image copies files from the builder stage's /app/dist folder.
Fill all three blanks to complete the multi-stage Dockerfile that builds and runs a Python app.
FROM [1] AS builder WORKDIR /app COPY . /app RUN pip install -r requirements.txt && python setup.py build FROM [2] WORKDIR /app COPY --from=[3] /app/dist /app CMD ["python", "app.py"]
The build stage uses python:3.12-slim, the final stage uses a smaller python:3.12-alpine image, and files are copied from the builder stage.