Docker - Image Optimization
You want to build a minimal container with a Go app using
scratch. Which Dockerfile snippet correctly builds and runs the app?FROM golang:1.20 AS builder WORKDIR /app COPY . . RUN go build -o myapp . FROM scratch COPY --from=builder /app/myapp / CMD ["/myapp"]
