A Go service for flood-alert SMS is compiled in CI. Why would the Dockerfile use a second FROM stage?
Select an answer to reveal the explanation.
Short Explanation
Build the furniture in a big workshop, then deliver only the finished chair to the apartment. The saws and scraps stay behind—smaller, safer images for the registry and cluster.
Full Explanation
Multi-stage builds use an early stage for compilation and a later FROM for a minimal runtime base. Only the resulting binary or static assets are copied forward, so the toolchain never reaches the registry or production nodes. That shrinks attack surface and image size without changing how the app runs.