Dockerfiles, Buildpacks, Jib and more ... what's the best way to run your Java code in Containers?
summary
Compares concrete builds: plain Dockerfile yields a 335 MB image; adding multi-stage Dockerfile plus layer-splitting makes rebuilds tiny (only ~6 KB app delta) and cache use cuts builds from full dependency downloads to ~13s; JLink + JDeps produces a custom JRE and shrinks images to ~184 MB or below 100 MB on Alpine; JVM-focused tools like Google's JIB / Google’s chip and Cloud-Native Buildpacks automate layering and let pipelines rebase images quickly for vuln fixes. Tradeoffs: simplicity vs control and reproducibility.
AI-written summary · about
chapters (11)
- 0:00Introduction and welcome
- 2:59What is a container image
- 7:11Dockerfile basics and evolution
- 11:53Multi-stage Dockerfiles
- 13:56BuildKit and caching
- 17:32Optimizing Java layers
- 20:05Live demo of Dockerfile optimizations
- 32:17Introduction to Jib
- 38:43Introduction to Buildpacks
- 47:54Comparison and recommendations
- 50:04Q&A and closing
