What does a multi-stage build achieve?

IntermediateConceptDocker
Answer

You build in a heavy stage (compilers, SDKs) and copy only the artifacts into a slim final stage, so the image is smaller and has a smaller attack surface.

All Real-World Interview questions Roadmap: Interview readiness

More on Docker