Multi-stage Builds
What is the main benefit of a multi-stage Dockerfile for a compiled Go service?
Choose one answer
The final image can be based on several base images at once, merging their layers.
The stages run in parallel on several machines, so builds finish faster.
The final image only contains what the last stage copies in, such as the binary, not the compiler or sources.
The build context is sent to each stage separately, so secrets or .env files in the context can never end up in any layer of the final image.
.env