Introduction
When building Docker images, you can create multiple steps called stages. Targeting specific stages lets you build only part of the image, saving time and space.
When you want to build only the final app without the build tools to keep the image small
When you want to test or debug an intermediate stage separately
When you want to reuse a build stage for different final images
When you want to speed up builds by skipping unnecessary stages
When you want to create multiple images from one Dockerfile with different contents