Dockerfiles, Buildpacks, Jib and more, best way to run Java code in Containers?
summary
Compares concrete workflows and shows what actually changes: a plain copy-based image embeds a 23.3 MB Spring Boot JAR as a single layer, splitting JAR into dependencies/resources/classes yields a 6.17 KB changing layer for fast rebuilds, using jlink + jdeps produces a custom JRE and cuts images to ~184 MB or under 100 MB on Alpine, and Jib (Maven/Gradle plugin) builds images without a Docker daemon and is fastest for repeatable CI builds; Cloud Native Buildpacks (paketo) automates detection and supports jlink. The tradeoff is ~4 lines versus ~40-line optimized Dockerfiles.
AI-written summary · about
chapters (10)
- 0:00Introduction and context
- 2:39Containers basics
- 6:24Evolution of Dockerfiles
- 9:21Advanced Dockerfile techniques
- 13:02Optimizing image structure
- 16:53Custom runtimes with jlink
- 20:20Live demonstration
- 35:00Google Jib and automation
- 38:56Buildpacks and final strategy
- 43:31Conclusion and resources
related talks
49mDockerfiles, Jib ..., what's the best way to run your Java code in Containers?
49mJava Container Mastery: Optimizing Images Across Build Tools
32mDockerfile vs Jib vs Pack vs Native Image: Which Is the Best Image Build Method?
46mWrite Once, Run Anywhere? Building Perfect Docker Images for Java Apps
51mJava applications containerized and deployed, make your buildpack edition
50mHowto: Options Galore to Get from Source Code to Container
54mHowto: Options Galore to Get from Source Code to Container
43mBuilding containers without DockerFile
