Complete the Dockerfile line to name the build stage.
FROM alpine AS [1]The AS builder names the stage 'builder' so it can be referenced later.
Complete the COPY command to copy files from the 'builder' stage.
COPY --from=[1] /app/build /app
The --from=builder copies files from the stage named 'builder'.
Fix the error in the FROM line to correctly name the stage.
FROM node AS [1]Stage names cannot have spaces or dots. Underscores are allowed, so 'build_stage' is correct.
Fill both blanks to copy from the 'builder' stage and set the working directory.
COPY --from=[1] /src /app WORKDIR [2]
The COPY command uses --from=builder to copy files from the 'builder' stage. The WORKDIR is set to /app to work inside that directory.
Fill all three blanks to define a multi-stage build with a named stage, copy from it, and set the final command.
FROM golang:1.20 AS [1] WORKDIR /app RUN go build -o main . FROM alpine COPY --from=[2] /app/main /usr/local/bin/main CMD ["[3]"]
The first stage is named 'builder'. The COPY command uses --from=builder to get the built binary. The CMD runs the binary named 'main'.