From 6fb46d74727f603e6dfd528590b0ab027ed92e3c Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:11:41 +0200 Subject: [PATCH 1/2] build(cache): containerd required for cache backends with docker worker Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- content/build/cache/backends/_index.md | 6 +++--- content/build/drivers/_index.md | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/content/build/cache/backends/_index.md b/content/build/cache/backends/_index.md index f0b4915f22..d11b4e3c13 100644 --- a/content/build/cache/backends/_index.md +++ b/content/build/cache/backends/_index.md @@ -17,9 +17,9 @@ An external cache becomes almost essential in CI/CD build environments. Such environments usually have little-to-no persistence between runs, but it's still important to keep the runtime of image builds as low as possible. -The default `docker` driver supports the `inline` and `local` cache backends. -Other cache backends require you to select a different -[driver](../../drivers/index.md). +The default `docker` driver supports the `inline`, `local`, `registry`, and +`gha` cache backends, but only if you have enabled the [containerd image store](/desktop/containerd.md). +Other cache backends require you to select a different [driver](../../drivers/_index.md). > **Warning** > diff --git a/content/build/drivers/_index.md b/content/build/drivers/_index.md index 40905f8732..adf30fdf24 100644 --- a/content/build/drivers/_index.md +++ b/content/build/drivers/_index.md @@ -27,11 +27,14 @@ The following table outlines some differences between drivers. | Feature | `docker` | `docker-container` | `kubernetes` | `remote` | | :--------------------------- | :---------: | :----------------: | :----------: | :----------------: | | **Automatically load image** | ✅ | | | | -| **Cache export** | Inline only | ✅ | ✅ | ✅ | +| **Cache export** | ✓\* | ✅ | ✅ | ✅ | | **Tarball output** | | ✅ | ✅ | ✅ | | **Multi-arch images** | | ✅ | ✅ | ✅ | | **BuildKit configuration** | | ✅ | ✅ | Managed externally | +\* _The `docker` driver doesn't support all cache export options. +See [Cache storage backends](../cache/backends/_index.md) for more information._ + ## Loading to local image store Unlike when using the default `docker` driver, images built using other drivers From ae2feb222bf42e1e731b970fb79f474fa21fe8a8 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:12:50 +0200 Subject: [PATCH 2/2] build(cache): removed dest parameter for registry backend The registry cache exporter doesn't support such a parameter. Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- content/build/cache/backends/registry.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/build/cache/backends/registry.md b/content/build/cache/backends/registry.md index 56e611b43c..7ed319961b 100644 --- a/content/build/cache/backends/registry.md +++ b/content/build/cache/backends/registry.md @@ -39,7 +39,6 @@ The following table describes the available CSV parameters that you can pass to | Name | Option | Type | Default | Description | | ------------------- | ----------------------- | ----------------------- | ------- | -------------------------------------------------------------------- | | `ref` | `cache-to`,`cache-from` | String | | Full name of the cache image to import. | -| `dest` | `cache-to` | String | | Path of the local directory where cache gets exported to. | | `mode` | `cache-to` | `min`,`max` | `min` | Cache layers to export, see [cache mode][1]. | | `oci-mediatypes` | `cache-to` | `true`,`false` | `true` | Use OCI media types in exported manifests, see [OCI media types][2]. | | `compression` | `cache-to` | `gzip`,`estargz`,`zstd` | `gzip` | Compression type, see [cache compression][3]. |