From 91224bc1558038201ee3b954145d5bacfe8a7a7f Mon Sep 17 00:00:00 2001 From: favonia Date: Thu, 30 Nov 2023 06:27:49 -0600 Subject: [PATCH] docs(README): add a hint about multi-arch builds Document probably the most common usage of `DOCKER_METADATA_ANNOTATIONS_LEVELS`: multi-arch builds. Signed-off-by: favonia --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1884710..bee1f49 100644 --- a/README.md +++ b/README.md @@ -954,9 +954,17 @@ The same can be done with the [`bake-action`](https://github.com/docker/bake-act targets: build ``` -If you want to set specific level(s) for your annotations, you can use the +Note that annotations can be attached at many different levels within a manifest. +By default, the generated annotations will be attached to image manifests, +but different registries may expect annotations at different places; +a common practice is to read annotations at _image indexes_ if present, +which are often used by multi-arch builds to index platform-specific images. +If you want to specify level(s) for your annotations, you can use the [`DOCKER_METADATA_ANNOTATIONS_LEVELS` environment variable](#environment-variables) -with a comma separated list of levels (defaults to `manifest`): +with a comma separated list of all levels the annotations should be attached to (defaults to `manifest`). +The following configuration demonstrates the ability to attach annotations to both image manifests and image indexes, +though your registry may only need annotations at the index level. (That is, `index` alone may be enough.) +Please consult the documentation of your registry. ```yaml -