Use multi-stage Dockerfile.
This PR changes the Dockerfile so an image is built in two stages:
- build the Spring application JAR
- get the previously built JAR artifact and run it
The final image is slimmer than before because it only has the bare minimum required to run the Spring application.
before: spring-demo
after: spring-demo-alpine
Edited by Wayne Haber