Skip to content

build: add --provenance=false to fix OCI manifest format#678

Open
shravyavorugallu wants to merge 1 commit into
NVIDIA:mainfrom
shravyavorugallu:fix-oci-manifest-provenance
Open

build: add --provenance=false to fix OCI manifest format#678
shravyavorugallu wants to merge 1 commit into
NVIDIA:mainfrom
shravyavorugallu:fix-oci-manifest-provenance

Conversation

@shravyavorugallu

Copy link
Copy Markdown

Closes #676

Problem

docker buildx build with BuildKit >=0.11 attaches provenance attestations by default. This causes the published image to be an OCI image index (application/vnd.oci.image.index.v1+json) instead of a Docker manifest list (application/vnd.docker.distribution.manifest.list.v2+json).

Consumers that rely on the Docker registry v2 manifest API break:

  • Renovate fails to parse the manifest and cannot detect new image versions
  • Harbor and internal registries in air-gapped HPC environments reject or mis-classify the image
  • docker pull on older Docker Engine versions may fail

Fix

Add --provenance=false to DOCKERCMD. This suppresses provenance attestation attachment and keeps the published manifest as a standard Docker v2 manifest list.

The local build target overrides DOCKERCMD entirely (to plain docker build) and is unaffected.

Precedent

NVIDIA/gpu-operator#2540 applied the identical fix.

Testing

# After the fix, verify the manifest type:
docker buildx imagetools inspect nvidia/dcgm-exporter:latest
# Should show: application/vnd.docker.distribution.manifest.list.v2+json

Closes NVIDIA#676

docker buildx build attaches provenance attestations by default when
BuildKit >= 0.11 is in use. This causes the published image manifest to
be an OCI image index (application/vnd.oci.image.index.v1+json) instead
of a Docker manifest list (application/vnd.docker.distribution.manifest.list.v2+json).

Consumers that rely on the Docker v2 manifest API — such as Renovate,
Harbor, and many internal registry scanners used in air-gapped HPC
environments — fail to pull or inspect the image when presented with an
OCI index.

Fix: pass --provenance=false to docker buildx build in the base
DOCKERCMD variable. This suppresses provenance attestation attachment
and keeps the published manifest as a standard Docker manifest list.

The local build target overrides DOCKERCMD entirely (to plain
'docker build') and is therefore unaffected by this change.

Precedent: NVIDIA/gpu-operator#2540 applied the same fix.
Signed-off-by: Shravya Vorugallu <shravyavorugallu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker manifest published as OCI image index instead of Docker manifest list

1 participant