Complete the Dockerfile line to start a new build stage named 'builder'.
FROM golang:1.20 AS [1]
The AS builder part names the build stage 'builder' for later reference.
Complete the COPY command to copy files from the 'builder' 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 to correctly name the final stage.
FROM alpine AS [1]The final stage is commonly named 'final' to distinguish it from build stages.
Fill both blanks to complete the multi-stage build Dockerfile snippet.
RUN go build -o /app/myapp [1] && \ COPY --from=[2] /app/myapp /usr/local/bin/myapp
The build command uses the source directory './src'. The copy command pulls from the 'builder' stage.
Fill all three blanks to complete the multi-stage Dockerfile for a Go app.
FROM golang:1.20 AS [1] WORKDIR /src COPY . . RUN go build -o /app/myapp [2] FROM alpine AS [3] COPY --from=builder /app/myapp /usr/local/bin/myapp CMD ["myapp"]
The first stage is named 'builder'. The build command uses './src' as source. The final stage is named 'final'.