-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
Description
As per output parameter documentation:
Keys supported by image output:
...
oci-mediatypes=true: use OCI mediatypes in configuration JSON instead of Docker's
However, the behaviour of buildkit seems not to always consider the value of that parameter. Even if the value is false
, buildkit arbitrarily switches to OCI media types during container builds if:
- the build invocation includes any kind of attestations (provenance, SBOM)
- the build invocation includes annotations
Buildkit
takes care of printing a warning in the log then the switch needs to happen, such as:
forcibly turning on oci-mediatype mode for attestations
but it is not easy detectable, given that this information is not immediately available when the build is performed using buildx or GitHub actions.
Moreover, the provenance attestation is something that gets added by default so it needs to be explicitly disabled for preventing the media-types change to happen.
I was unable to find this behaviour described anywhere in the docker/buildikit documentation.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
New