mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-03 07:40:28 +08:00
* Use buildx's `docker` driver for buildbox-oriented GHA jobs
setup-buildx-action uses the docker-container buildx driver by default,
which is useful for advanced buildx features like customizing buildkit,
doing multi-arch builds, and advanced cache import/export (particularly
as it pertains to multi-arch builds).
However, we're not using these features in our buildbox-oriented GHA
jobs, and in fact the `docker-container` driver is not well suited for
our `buildbox-centos7-fips` Make target, which relies on "old school"
(`docker` driver) behavior that expects to find an updated version of
the image built by `buildbox-centos7` (`Dockerfile-centos7`) to pass as
the FROM argument to the `buildbox-centos7-fips`.
(`Dockerfile-centos7-fips`). Since the `docker-container` driver runs
each build in a separate container, the `buildbox-centos7-fips` build
can't see the updated image built by `buildbox-centos7`, and so resorts
to the stale image in the remote docker repository.
We could restructure our docker buildx commands to work around this, but
that would result in a much more complicated, distributed build process
that would potentially increase cloud spend, for marginal benefit to the
status quo at best. Instead we can just use the `docker` driver for our
buildbox-oriented GHA to keep things simple, and only update to the
`docker-container` driver when we need to use its advanced features.
Refs:
- https://github.com/docker/setup-buildx-action
- https://docs.docker.com/build/drivers/
* Adds `BUILDKIT_INLINE_CACHE=1` to `buildx build` commands that use `--cache-from`.
The `--cache-from` flag is used to specify a cache source. This "cache" is
a special buildx cache that improves on the traditional docker layer-based cache.
While there are advanced options for exporting/importing this advanced cache separately
from the image (layer-based cache), the simplest way to make use of it is to just
embed the advanced cache inline in the image itself. This is what this BUILDKIT_INLINE_CACHE=1
does.
* Release v16.0.0-dev.isaiah.18
* swaps --build-arg BUILDKIT_INLINE_CACHE=1 for --cache-to type=inline
* adds DOCKER_BUILDER_NAME
* Revert "Release v16.0.0-dev.isaiah.18"
This reverts commit 6107dae6d8.
* simplify DOCKER_BUILDER_NAME
* clarify comment wording
* updating e-ref to latest