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+jsonCommon 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
- 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
- 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
Docker Push "unsupported MediaType" / "manifest invalid" to Registry in CIFix Docker push "manifest invalid: unsupported MediaType" / OCI-vs-Docker manifest errors in CI - a registry…
Docker "--provenance"/"--sbom" Attestations Break --load or an Older RegistryFix Docker buildx "--provenance"/"--sbom" attestation failures in CI - attestations turn a build into a manif…
Docker "unexpected status code ... 401/403" from Registry - Fix Auth FlowFix Docker "received unexpected status code 401 Unauthorized / 403 Forbidden" from a registry in CI - a broke…