Docker Bake, elegance and standardization for building your Docker images
summary
Docker Bake (GA 2025) standardizes Docker image builds by using BuildKit/Buildx and an HCL-based configuration to replace fragile shell scripts, offering variable validation, inheritance, and build matrices. The talk demonstrates building a Python linter/test image (UV and Ruf), publishing to Artifact Registry, and running the same build locally and in Cloud Build, GitHub Actions, and GitLab CI; it highlights BuildKit/Buildx, HCL syntax, parallel matrix builds, and cache-from/cache-to for faster incremental builds.
AI-written summary · about
chapters (16)
- 0:00Docker Bake intro
- 1:09Docker Build history
- 4:23Bake features
- 7:14Demo: Scripts vs Bake
- 11:32Variables and validation
- 16:09Demo: Lint and tests
- 22:15Custom groups and targets
- 24:21HCL file composition
- 25:46Config inheritance
- 26:51Multi-OS build matrix
- 32:10Bake with Compose
- 34:40Bake from GitHub
- 36:04Bake in Cloud Build
- 39:12Bake in GitHub Actions
- 41:18Bake in GitLab CI
- 42:42Conclusion
related talks
28mWhat's New in Docker Build
39mAbusing Docker builds with BuildKit and friends
21mMaking Reproducible Builds Faster with Docker Bake
05mDocker, a little container of consistency
29mHow to Improve Your Image Builds Using Advance Docker Build
25mBuilding Docker Images Without Docker
28mCompiling Containers
58mOptions Galore to Get from Source Code to Container
