mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-19 01:47:43 +08:00
docs: imagetools create --annotation
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> (cherry picked from commit a4c392f4dbeaa1f01622dc6f811fe1566d68753e)
This commit is contained in:
parent
542e5d810e
commit
a494e9ccc4
@ -11,7 +11,7 @@ Create a new image based on source images
|
|||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default | Description |
|
||||||
|:---------------------------------|:--------------|:--------|:-----------------------------------------------------------------------------------------|
|
|:---------------------------------|:--------------|:--------|:-----------------------------------------------------------------------------------------|
|
||||||
| `--annotation` | `stringArray` | | Add annotation to the image |
|
| [`--annotation`](#annotation) | `stringArray` | | Add annotation to the image |
|
||||||
| [`--append`](#append) | | | Append to existing manifest |
|
| [`--append`](#append) | | | Append to existing manifest |
|
||||||
| [`--builder`](#builder) | `string` | | Override the configured builder instance |
|
| [`--builder`](#builder) | `string` | | Override the configured builder instance |
|
||||||
| [`--dry-run`](#dry-run) | | | Show final image instead of pushing |
|
| [`--dry-run`](#dry-run) | | | Show final image instead of pushing |
|
||||||
@ -31,6 +31,34 @@ specified, create performs a carbon copy.
|
|||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
### <a name="annotation"></a> Add annotations to an image (--annotation)
|
||||||
|
|
||||||
|
The `--annotation` flag lets you add annotations the image index, manifest,
|
||||||
|
and descriptors when creating a new image.
|
||||||
|
|
||||||
|
The following command creates a `foo/bar:latest` image with the
|
||||||
|
`org.opencontainers.image.authors` annotation on the image index.
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ docker buildx imagetools create \
|
||||||
|
--annotation "index:org.opencontainers.image.authors=dvdksn" \
|
||||||
|
--tag foo/bar:latest \
|
||||||
|
foo/bar:alpha foo/bar:beta foo/bar:gamma
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
>
|
||||||
|
> The `imagetools create` command supports adding annotations to the image
|
||||||
|
> index and descriptor, using the following type prefixes:
|
||||||
|
>
|
||||||
|
> - `index:`
|
||||||
|
> - `manifest-descriptor:`
|
||||||
|
>
|
||||||
|
> It doesn't support annotating manifests or OCI layouts.
|
||||||
|
|
||||||
|
For more information about annotations, see
|
||||||
|
[Annotations](https://docs.docker.com/build/building/annotations/).
|
||||||
|
|
||||||
### <a name="append"></a> Append new sources to an existing manifest list (--append)
|
### <a name="append"></a> Append new sources to an existing manifest list (--append)
|
||||||
|
|
||||||
Use the `--append` flag to append the new sources to an existing manifest list
|
Use the `--append` flag to append the new sources to an existing manifest list
|
||||||
|
Loading…
x
Reference in New Issue
Block a user