Crafting the Ultimate Docker Image for Spring Applications
summary
Starts from a 580 MB fat JAR image where each build adds ~500 MB, shows a multi-stage Dockerfile that drops the image to ~59 MB and introduces Spring Boot layers so subsequent pushes pull only the ~3 MB delta. Demonstrates pack/buildpacks doing that automatically, explains CDS (app class-data sharing) cutting startup by ~50–80% (example: a 2 minute ThingsBoard cold start down to seconds), contrasts Graal/native images (good for small services) and CRaC checkpoint/restore which can reach 10–50 ms but requires special privileges.
AI-written summary · about
chapters (10)
- 0:00Introduction and basics
- 3:56Initial Docker optimization
- 8:25Multi-stage builds and layering
- 12:08Exploring jar layer structure
- 17:40Using Paketo buildpacks
- 21:15Optimizing startup time with CDS
- 27:27CRAC checkpointing
- 34:00Implementing manual checkpointing
- 36:40Native images and summary
- 39:45Q&A and conclusion
related talks
48mA Practical Guide to Containerizing Your Spring Boot Application
51mLean Spring Boot Applications for The Cloud
01h 12mSpring Boot "fat" JAR: The Thin Parts of a Thick Artifact
01h 13mSpring: Your next Java microframework
55mCloud Native with Spring Boot & Kubernetes
44mFrom Spring Native to Spring Boot 3
39mHow to Reduce the Footprint of Your Spring Boot Applications
01h 03mBootiful Spring Boot 3
