Complete the code to start a multi-stage build with the first stage named 'builder'.
FROM alpine AS [1]The first stage is named 'builder' to separate build dependencies from the final image.
Complete the code to copy the built binary from the 'builder' stage to the final stage.
COPY --from=[1] /app/myapp /usr/local/bin/myapp
The --from=builder option copies files from the 'builder' stage.
Fix the error in the Dockerfile line that copies files from the build stage.
COPY --from=[1] /app/myapp /usr/local/bin/myapp
The stage name must exactly match the name given in the FROM ... AS line, which is 'builder'.
Fill both blanks to create a final stage that uses a small base image and copies the binary from the builder.
FROM [1] COPY --from=[2] /app/myapp /usr/local/bin/myapp
The final stage uses 'alpine' for a small image and copies from the 'builder' stage.
Fill all three blanks to complete a multi-stage Dockerfile that builds and copies a binary, then sets the entrypoint.
FROM golang:1.20 AS [1] WORKDIR /app COPY . . RUN go build -o myapp . FROM [2] COPY --from=[3] /app/myapp /usr/local/bin/myapp ENTRYPOINT ["myapp"]
The first stage is named 'builder'. The final stage uses 'alpine'. The copy command uses '--from=builder'.