Multistage build in Docker
Example Use Cases When might you want to use a multi-stage build? It allows you to do an entire pipeline within a single build, rather than having to script the pipeline externally. Here’s a few examples… Java apps using WAR files First stage uses a container with Maven to compile, test, and build the war file Second stage copies the built war file into an image with the app server (Wildfly, Tomcat, Jetty, etc....