Skip to content
Latchkey

Docker "unsupported media type" registry error in CI

Registries advertise which manifest and content media types they accept. Pushing an OCI image index, an attestation, or a SBOM/provenance manifest to a registry that only understands legacy Docker media types fails with unsupported media type.

What this error means

A push fails with unsupported media type or manifest invalid: unsupported manifest media type. The registry rejected the manifest format being sent.

docker
failed to push ghcr.io/myorg/api:1.4.2: unsupported media type application/vnd.oci.image.index.v1+json

Common causes

The registry does not accept OCI media types

An older registry may only support Docker schema2, not OCI image indexes.

Attestations/SBOM media types rejected

Pushing provenance/SBOM attestations can fail on registries that do not support those manifest types.

How to fix it

Push Docker-format manifests

  1. Force the legacy Docker manifest type when the registry is old.
Terminal
docker buildx build --output type=registry,oci-mediatypes=false \
  -t registry.internal/myorg/api:1.4.2 .

Disable attestations the registry rejects

  1. Turn off provenance/SBOM if the registry cannot store them.
Terminal
docker buildx build --provenance=false --sbom=false \
  -t registry.internal/myorg/api:1.4.2 --push .

How to prevent it

  • Match output media types to registry capabilities.
  • Disable attestations for registries that reject them.
  • Upgrade the registry to one with OCI support.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →