Skip to content

Commit 4a3603b

Browse files
authored
Update s3 cache options (#23758)
## Description Add missing S3 `prefix` option, and update existing options which lacked current defaults. A link regarding authentication pointed to an old, EOL API which was also updated; an equivalent link should be fixed in buildkit docs as well (moby/buildkit#6379). The description I added for `prefix` is a little vague. The buildkit docs for that option in particular is also vague, but makes sense in the context of the documentation for other options. I opted to stay consistent with the language and brevity of the surrounding docs, leaving it to buildkit docs to clarify how it works. ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review
2 parents 3be86cb + 0e18ebc commit 4a3603b

File tree

1 file changed

+18
-17
lines changed
  • content/manuals/build/cache/backends

1 file changed

+18
-17
lines changed

content/manuals/build/cache/backends/s3.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,23 @@ $ docker buildx build --push -t <user>/<image> \
2727
The following table describes the available CSV parameters that you can pass to
2828
`--cache-to` and `--cache-from`.
2929

30-
| Name | Option | Type | Default | Description |
31-
| -------------------- | ----------------------- | ----------- | ------- | -------------------------------------------------------------- |
32-
| `region` | `cache-to`,`cache-from` | String | | Required. Geographic location. |
33-
| `bucket` | `cache-to`,`cache-from` | String | | Required. Name of the S3 bucket. |
34-
| `name` | `cache-to`,`cache-from` | String | | Name of the cache image. |
35-
| `endpoint_url` | `cache-to`,`cache-from` | String | | Endpoint of the S3 bucket. |
36-
| `blobs_prefix` | `cache-to`,`cache-from` | String | | Prefix to prepend to blob filenames. |
37-
| `upload_parallelism` | `cache-to` | Integer | `4` | Number of parallel layer uploads. |
38-
| `touch_refresh` | `cache-to` | Time | `24h` | Interval for updating the timestamp of unchanged cache layers. |
39-
| `manifests_prefix` | `cache-to`,`cache-from` | String | | Prefix to prepend on manifest filenames. |
40-
| `use_path_style` | `cache-to`,`cache-from` | Boolean | `false` | When `true`, uses `bucket` in the URL instead of hostname. |
41-
| `access_key_id` | `cache-to`,`cache-from` | String | | See [authentication][1]. |
42-
| `secret_access_key` | `cache-to`,`cache-from` | String | | See [authentication][1]. |
43-
| `session_token` | `cache-to`,`cache-from` | String | | See [authentication][1]. |
44-
| `mode` | `cache-to` | `min`,`max` | `min` | Cache layers to export, see [cache mode][2]. |
45-
| `ignore-error` | `cache-to` | Boolean | `false` | Ignore errors caused by failed cache exports. |
30+
| Name | Option | Type | Default | Description |
31+
|----------------------| ----------------------- | ----------- |--------------|----------------------------------------------------------------|
32+
| `region` | `cache-to`,`cache-from` | String | | Required. Geographic location. |
33+
| `bucket` | `cache-to`,`cache-from` | String | | Required. Name of the S3 bucket. |
34+
| `name` | `cache-to`,`cache-from` | String | `buildkit` | Name of the cache image. |
35+
| `endpoint_url` | `cache-to`,`cache-from` | String | | Endpoint of the S3 bucket. |
36+
| `prefix` | `cache-to`,`cache-from` | String | | Prefix to prepend to all filenames. |
37+
| `blobs_prefix` | `cache-to`,`cache-from` | String | `blobs/` | Prefix to prepend to blob filenames. |
38+
| `upload_parallelism` | `cache-to` | Integer | `4` | Number of parallel layer uploads. |
39+
| `touch_refresh` | `cache-to` | Time | `24h` | Interval for updating the timestamp of unchanged cache layers. |
40+
| `manifests_prefix` | `cache-to`,`cache-from` | String | `manifests/` | Prefix to prepend to manifest filenames. |
41+
| `use_path_style` | `cache-to`,`cache-from` | Boolean | `false` | When `true`, uses `bucket` in the URL instead of hostname. |
42+
| `access_key_id` | `cache-to`,`cache-from` | String | | See [authentication][1]. |
43+
| `secret_access_key` | `cache-to`,`cache-from` | String | | See [authentication][1]. |
44+
| `session_token` | `cache-to`,`cache-from` | String | | See [authentication][1]. |
45+
| `mode` | `cache-to` | `min`,`max` | `min` | Cache layers to export, see [cache mode][2]. |
46+
| `ignore-error` | `cache-to` | Boolean | `false` | Ignore errors caused by failed cache exports. |
4647

4748
[1]: #authentication
4849
[2]: _index.md#cache-mode
@@ -57,7 +58,7 @@ Alternatively, you can use the `access_key_id`, `secret_access_key`, and
5758
Refer to [AWS Go SDK, Specifying Credentials][3] for details about
5859
authentication using environment variables and credentials file.
5960

60-
[3]: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials
61+
[3]: https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/configure-gosdk.html#specifying-credentials
6162

6263
## Further reading
6364

0 commit comments

Comments
 (0)