Introduction
Method 1: Spring Boot Build Plugin
I was actually surprised that Spring Boot and Maven already have docker builder basically build-in into Maven. Plugin uses BuildPack builder which automatically detects SpringBoot app, and then it builds the relevant image for you.
mvn spring-boot:build-image -Dspring-boot.build-image.imageName=hello-jvm:buildPacks
Images are a bit large and not optimized (but that also depends on JDK that you use). In the end all dependencies and compiled application is stored in a single...