[rfe] use docker buildx for remote layer caching
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| kolla |
New
|
Undecided
|
Unassigned | ||
Bug Description
The current way that kolla does builds, either with the docker or podman backends, only makes use of cache if it's already present on the build machine. It's fairly cumbersome to ensure this build cache is populated, especially with (non-buildx) docker.
I wanted to propose using the `python_on_whales` library which wraps the docker buildx CLI to add buildx support, and then use the `cache_from` and `cache_to` arguments to handle remote layer caching.
In particular, this enables a workflow where building a branch can fetch multiple cache sources, such as
1. upstream/
2. fork/$IMAGE:
3. fork/$IMAGE:
This helps ensure that even if rebuilding many images, they'll share a majority of layers with ones that are already pushed. (modulo other cache-breaking issues like https:/

Related fix proposed to branch: master /review. opendev. org/c/openstack /kolla/ +/949230
Review: https:/