Skip to content

build: handle buildkit defaulting to oci mediatypes#3888

Open
crazy-max wants to merge 1 commit into
docker:masterfrom
crazy-max:fix-oci-mediatypes
Open

build: handle buildkit defaulting to oci mediatypes#3888
crazy-max wants to merge 1 commit into
docker:masterfrom
crazy-max:fix-oci-mediatypes

Conversation

@crazy-max

@crazy-max crazy-max commented Jun 5, 2026

Copy link
Copy Markdown
Member

follow-up moby/buildkit#6824

Updates Buildx integration behavior for BuildKit versions that default image exports to OCI media types since moby/buildkit#6824

BuildKit compatibility version 30 changes image exports so the default manifest and index media types are OCI media types instead of Docker schema media types. The imagetools integration tests now derive the expected default media type from the BuildKit version, so older BuildKit versions keep expecting Docker media types while newer versions expect OCI media types.

The TestBuildIndexAnnotationsLoadDocker case now sets oci-mediatypes=false explicitly. This keeps the test focused on the Docker media type conflict without treating type=docker itself as a request for Docker schema media types. The default type=docker behavior is handled by the BuildKit-side fix in moby/buildkit#6844.

@crazy-max crazy-max requested a review from tonistiigi June 5, 2026 08:23
@crazy-max crazy-max marked this pull request as ready for review June 5, 2026 08:23
@crazy-max crazy-max added this to the v0.35.0 milestone Jun 5, 2026
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max force-pushed the fix-oci-mediatypes branch from f794eff to 456bcb7 Compare June 9, 2026 11:38
Comment thread tests/build.go
skipNoCompatBuildKit(t, sb, ">= 0.11.0-0", "annotations")
dir := createTestProject(t)
out, err := buildCmd(sb, withArgs("--annotation", "index:foo=bar", "--provenance", "false", "--output", "type=docker", dir))
out, err := buildCmd(sb, withArgs("--annotation", "index:foo=bar", "--provenance", "false", "--output", "type=docker,oci-mediatypes=false", dir))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oci-mediatypes=false

Is this needed after we merged moby/buildkit#6844 ? I think it should not be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants