Skip to content

Use multi-stage Dockerfile.

Oscar Paramo requested to merge oparamo/spring:add-multistage-dockerfile into master

This PR changes the Dockerfile so an image is built in two stages:

  1. build the Spring application JAR
  2. 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.

Screenshot_from_2018-10-25_23-47-41

before: spring-demo after: spring-demo-alpine

Edited by Wayne Haber

Merge request reports

Loading