Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-image-not-found not compatible with oci mediatype #1141

Closed
MikeMcC399 opened this issue Jul 3, 2024 · 1 comment · Fixed by #1151
Closed

docker-image-not-found not compatible with oci mediatype #1141

MikeMcC399 opened this issue Jul 3, 2024 · 1 comment · Fixed by #1151

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Jul 3, 2024

Issue

The npm module docker-image-not-found fails with the error message

RestError [InvalidContentError]: unsupported schema version 2

when a Docker Hub image has been published with an OCI image manifest - see Open Container Initiative (OCI).

It is unable to process

   "schemaVersion": 2,
   "mediaType": "application/vnd.oci.image.index.v1+json",

although it can process

   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",

docker-image-not-found is used in the circle.yml workflow.

Although strictly speaking this is a failure (return code 1) it is the same code as returned if a docker type image is found. It may be acceptable to ignore this problem for the moment if it does not cause operational problems.

Logs

RestError [InvalidContentError]: unsupported schema version 2 in cypress/factory:4.0.1 manifest

Background

According to Docker Hub > Registry > Supported media types

You can push images with the following formats:

Compared to Docker buildx v0.9.1 (released Aug 18, 2022) Docker buildx v0.10.0 (released Jan 10, 2023) introduced SLSA Provenance with support for OCI-compliant multi-platform images.

Comparison with other Docker images

Running the following command to inspect other common images, shows that debian (which Cypress Docker images are based on) is using docker mediaType. There has not been a general clear migration to oci mediaType.

docker manifest inspect
Image mediaType
node application/vnd.oci.image.manifest.v1+json
ubuntu application/vnd.oci.image.manifest.v1+json
fedora application/vnd.docker.distribution.manifest.v2+json
debian application/vnd.docker.distribution.manifest.v2+json
cypress/factory application/vnd.docker.distribution.manifest.v2+json

Suggestion

Force circle.yml to generate docker mediaType to retain compatibility with docker-image-not-found. According to docker/buildx#1509 (comment) this can be achieved through:

Set --provenance=false

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

Successfully merging a pull request may close this issue.

1 participant