added tables for cache parameters

Signed-off-by: David Karlsson <david.karlsson@docker.com>
pull/1332/head
David Karlsson 2 years ago
parent e98c252490
commit 74a822568e

@ -27,20 +27,18 @@ $ docker buildx build . --push -t <registry>/<image> \
--cache-from type=azblob,name=<cache-image>[,parameters...] --cache-from type=azblob,name=<cache-image>[,parameters...]
``` ```
Common parameters: The following table describes the available CSV parameters that you can pass to
`--cache-to` and `--cache-from`.
- `name`: the name of the cache image.
- `account_url`: the base address of the blob storage account, for example: | Parameter | Option | Value | Default | Description |
`https://myaccount.blob.core.windows.net`. See | ------------------- | ---------- | ---------- | ------- | -------------------------------------------------- |
[authentication](#authentication). | `name` | Both | String | | Required. The name of the cache image. |
- `secret_access_key`: specifies the | `account_url` | Both | String | | Base URL of the storage account. |
[Azure Blob Storage account key](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage), | `secret_access_key` | Both | String | | Blob storage account key, see [authentication][1]. |
see [authentication](#authentication). | `mode` | `cache-to` | `min\|max` | `min` | Cache layers to export, see [cache mode][2]. |
Parameters for `--cache-to`: [1]: #authentication
[2]: index.md#cache-mode
- `mode`: specify cache layers to export (default: `min`), see
[cache mode](./index.md#cache-mode)
## Authentication ## Authentication

@ -31,18 +31,19 @@ $ docker buildx build . --push -t <registry>/<image> \
--cache-from type=gha[,parameters...] --cache-from type=gha[,parameters...]
``` ```
Common parameters: The following table describes the available CSV parameters that you can pass to
`--cache-to` and `--cache-from`.
- `url`: cache server URL (default `$ACTIONS_CACHE_URL`), see
[authentication](#authentication) | Parameter | Option | Value | Default | Description |
- `token`: access token (default `$ACTIONS_RUNTIME_TOKEN`), see | --------- | ---------- | ---------- | ------------------------------- | -------------------------------------------- |
[authentication](#authentication) | `url` | Both | String | `$ACTIONS_CACHE_URL` | Cache server URL, see [authentication][1]. |
- `scope`: cache scope (defaults to the name of the current Git branch). | `token` | Both | String | `$ACTIONS_RUNTIME_TOKEN` | Access token, see [authentication][1]. |
| `scope` | Both | String | Name of the current Git branch. | Cache scope, see [scope][2] |
Parameters for `--cache-to`: | `mode` | `cache-to` | `min\|max` | `min` | Cache layers to export, see [cache mode][3]. |
- `mode`: specify cache layers to export (default: `min`), see [1]: #authentication
[cache mode](./index.md#cache-mode) [2]: #scope
[3]: index.md#cache-mode
## Authentication ## Authentication

@ -26,30 +26,27 @@ $ docker buildx build . --push -t <registry>/<image> \
--cache-from type=local,src=path/to/local/dir, --cache-from type=local,src=path/to/local/dir,
``` ```
Parameters for `--cache-to`: The following table describes the available CSV parameters that you can pass to
`--cache-to` and `--cache-from`.
- `dest`: absolute or relative path to the local directory where you want to
export the cache to. | Parameter | Option | Value | Default | Description |
- `mode`: specify cache layers to export (default: `min`), see | ------------------- | ------------ | --------------------- | ------- | -------------------------------------------------------------------- |
[cache mode](./index.md#cache-mode) | `src` | `cache-from` | String | | Path of the local directory where cache gets imported from. |
- `oci-mediatypes`: whether to use OCI media types in exported manifests | `digest` | `cache-from` | String | | Digest of manifest to import, see [cache versioning][4]. |
(default `true`, since BuildKit `v0.8`), see | `dest` | `cache-to` | String | | Path of the local directory where cache gets exported to. |
[OCI media types](./index.md#oci-media-types) | `mode` | `cache-to` | `min\|max` | `min` | Cache layers to export, see [cache mode][1]. |
- `compression`: compression type for layers newly created and cached (default: | `oci-mediatypes` | `cache-to` | `true\|false` | `true` | Use OCI media types in exported manifests, see [OCI media types][2]. |
`gzip`), see [cache compression](./index.md#cache-compression) | `compression` | `cache-to` | `gzip\|estargz\|zstd` | `gzip` | Compression type, see [cache compression][3]. |
- `compression-level`: compression level for `gzip`, `estargz` (0-9) and `zstd` | `compression-level` | `cache-to` | `0..22` | | Compression level, see [cache compression][3]. |
(0-22) | `force-compression` | `cache-to` | `true\|false` | `false` | Forcibly apply compression. |
- `force-compression`: forcibly apply `compression` option to all layers
[1]: index.md#cache-mode
Parameters for `--cache-from`: [2]: index.md#oci-media-types
[3]: index.md#cache-compression
- `src`: absolute or relative path to the local directory where you want to [4]: #cache-versioning
import cache from.
- `digest`: specify explicit digest of the manifest list to import, see If the `src` cache doesn't exist, then the cache import step will fail, but the
[cache versioning](#cache-versioning) build will continue.
If the `src` cache doesn't exist, then the cache import step will fail, but
the build will continue.
## Cache versioning ## Cache versioning

@ -34,23 +34,22 @@ $ docker buildx build . --push -t <registry>/<image> \
--cache-from type=registry,ref=<registry>/<cache-image> --cache-from type=registry,ref=<registry>/<cache-image>
``` ```
Common parameters: The following table describes the available CSV parameters that you can pass to
`--cache-to` and `--cache-from`.
- `ref`: full address and name of the cache image that you want to import or | Parameter | Option | Value | Default | Description |
export. | ------------------- | ---------- | --------------------- | ------- | -------------------------------------------------------------------- |
| `ref` | Both | 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]. |
| `compression-level` | `cache-to` | `0..22` | | Compression level, see [cache compression][3]. |
| `force-compression` | `cache-to` | `true\|false` | `false` | Forcibly apply compression. |
Parameters for `--cache-to`: [1]: index.md#cache-mode
[2]: index.md#oci-media-types
- `mode`: specify cache layers to export (default: `min`), see [3]: index.md#cache-compression
[cache mode](./index.md#cache-mode)
- `oci-mediatypes`: whether to use OCI media types in exported manifests
(default `true`, since BuildKit `v0.8`), see
[OCI media types](./index.md#oci-media-types)
- `compression`: compression type for layers newly created and cached (default:
`gzip`), see [cache compression](./index.md#cache-compression)
- `compression-level`: compression level for `gzip`, `estargz` (0-9) and `zstd`
(0-22)
- `force-compression`: forcibly apply `compression` option to all layers
You can choose any valid value for `ref`, as long as it's not the same as the You can choose any valid value for `ref`, as long as it's not the same as the
target location that you push your image to. You might choose different tags target location that you push your image to. You might choose different tags

@ -28,19 +28,21 @@ $ docker buildx build . --push -t <user>/<image> \
--cache-from type=s3,region=<region>,bucket=<bucket>,name=<cache-image> --cache-from type=s3,region=<region>,bucket=<bucket>,name=<cache-image>
``` ```
Common parameters: The following table describes the available CSV parameters that you can pass to
`--cache-to` and `--cache-from`.
- `region`: geographic location
- `bucket`: name of the S3 bucket used for caching | Parameter | Option | Value | Default | Description |
- `name`: name of the cache image | ------------------- | ---------- | ---------- | ------- | -------------------------------------------- |
- `access_key_id`: access key ID, see [authentication](#authentication) | `region` | Both | String | | Geographic location. |
- `secret_access_key`: secret access key, see [authentication](#authentication) | `bucket` | Both | String | | Name of the S3 bucket used for caching |
- `session_token`: session token, see [authentication](#authentication) | `name` | Both | String | | Name of the cache image |
| `access_key_id` | Both | String | | See [authentication][1] |
Parameters for `--cache-to`: | `secret_access_key` | Both | String | | See [authentication][1] |
| `session_token` | Both | String | | See [authentication][1] |
- `mode`: specify cache layers to export (default: `min`), see | `mode` | `cache-to` | `min\|max` | `min` | Cache layers to export, see [cache mode][2]. |
[cache mode](./index.md#cache-mode)
[1]: #authentication
[2]: index.md#cache-mode
## Authentication ## Authentication

Loading…
Cancel
Save