[Spring Boot] 3 Ways of Dockerizing Spring Boot Application

Common Approach

Layered Jars

$ mvn package
$ java -Djarmode=layertools -jar ./target/spring-boot-docker-test-0.0.1-SNAPSHOT.jar listdependencies
spring-boot-loader
snapshot-dependencies
application

Buildpacks

$ mvn spring-boot:build-image
$ gradle bootBuildImage

Conclusion

--

--

https://www.linkedin.com/in/jaesik-kim-706b4a84

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store