ci: build Docker images once per architecture - #2652
Conversation
Mirko-von-Leipzig
left a comment
There was a problem hiding this comment.
Thank you, this looks good. TIL about docker bake - somewhat unintuitive that this is hidden under a random command that isn't just build.
Should we perhaps also include this in our release process? Perhaps by having bake publish the images under a temporary name using the workflow run ID e.g. run-id-<service>. Once finalized, the current publishing step can instead rename the images to their final name.
|
Yes, this would remove repeated work from releases. The release workflow runs For releases, Bake could push each service under the existing |
The Docker dry run starts two binary jobs and then seven image jobs. Each image job builds AMD64 and ARM64. When the shared BuildKit layer is missing, the same eight binaries can be compiled again for every image. Run 35223368381 shows this slow path.
This change uses one Bake job for each architecture. Each job builds the shared stage once and reaches all seven image targets. It copies only the Kache report to the Actions runner. Release publishing keeps its current image matrix.
Cold and warm CI runs will show whether the builder stays within its disk limit and reuses its BuildKit and Kache data.
Closes #2651
Changelog