Repository navigation
Conversation
| > It doesn't support annotating manifests or OCI layouts. Annotations also | ||
| > require the output to use the OCI image index media type; they aren't | ||
| > supported when the sources produce a Docker manifest list. When building | ||
| > source images with Buildx, use the `oci-mediatypes=true` output option to |
There was a problem hiding this comment.
can you remind me, does buildx produce oci mediatypes by default now? I seem to remember there was some heuristic which determined whether an image would be created as oci or docker, and that in most cases a build would produce an OCI index unless you explicitly opt out of provenance etc. But my memory on this is very vague.
There was a problem hiding this comment.
Yes, that's right. Before BuildKit v0.31, exports without attestations used Docker media types, while exports with attestations used OCI media types. Since Buildx enables minimal provenance by default for registry outputs, most Buildx builds already produced an OCI index unless provenance was disabled.
BuildKit v0.31 changed the default to OCI media types regardless. I've updated this note so oci-mediatypes=true is presented as an explicit opt-in for older builders, rather than something current Buildx users generally need.
Relevant upstream change: moby/buildkit#6824
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
a5967cb to
7816c52
Compare
fixes #2148
Untyped
imagetools createannotations now target the image index, while manifest annotations return an actionable error because the command doesn't rewrite manifests. Annotations targeting Docker manifest lists now fail instead of being silently discarded, and the error explains how to produce compatible sources withoci-mediatypes=true.