Jdeps, Jlink and Layers: Slim Down Your Java Docker Images
summary
Shows how to shrink Java Docker images by creating a custom runtime with jdeps and jlink, using Docker layer best practices and Spring-specific layered jars, and leveraging Docker’s garbage-collection cleanup. Also covers pitfalls to watch for (especially reflection-related API issues) and targets intermediate Java/Docker users with practical, accessible techniques.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 2:30Storage quota problem
- 5:17Dockerfile analysis
- 8:27JDEPS for modules
- 9:10JLink optimization
- 10:55Multistage build
- 12:41JDEPS and JLink in Dockerfile
- 15:51Results and size
- 16:12Docker layers
- 20:06Spring Boot layers
- 24:37Dockerfile order
- 27:27GC effects
- 31:19Reflection risks
- 34:29Missing modules
- 34:49Conclusion
related talks
49mJava Container Mastery: Optimizing Images Across Build Tools
49mJava and Containers Make it Awesome
46mDockerfiles, Buildpacks, Jib and more, best way to run Java code in Containers?
31mFast and Distroless Java in Containers: the Recipe!
20mSqueezing Java Containers: Shrinking Your Kubernetes Footprint with jlink
01h 01mDistilling Java Containers for Kubernetes
49mDockerfiles, Jib ..., what's the best way to run your Java code in Containers?
47mLegal JVM Doping in Your Containers
