- Docker multi-stage build allows you to use temporary images in the same Dockerfile. This is known as stages.
- Temporary images can be used to generate static artifacts - executable files, JS bundles, JAR files - running tests, generate static analysis, etc, before building the final image.
- Typically, teams use CI jobs to do that or more than one Dockerfile.
- The entire release process can be automated in the same Dockerfile reducing the number and size of layers in the final image.