Reputation: 642
While using the docker registry API, I was trying to access the manifest list (aka fat manifest) as described here.
The details of the curl call are:
curl "https://myserver/v2/<repository>/manifests/<version/" -H "Accept: application/vnd.docker.distribution.manifest.list.v2+json"
However the response for this is with the schemaVersion of 1. An Accept header of application/vnd.docker.distribution.manifest.v2+json
does seem to get the correct version of the manifest but doesn't seem to be working for the list type accept header.
Am I missing something in the URL or the headers?
Upvotes: 3
Views: 3879
Reputation: 4817
You need to use the application/vnd.docker.distribution.manifest.list.v2+json
header. There is however no guarantee that the registry serves you a manifest list, so you have to be able to handle ordinary image manifests as well.
From the docs:
When pulling images, clients indicate support for this new version of the manifest format by sending the
application/vnd.docker.distribution.manifest.v2+json
andapplication/vnd.docker.distribution.manifest.list.v2+json
media types in an Accept header when making a request to the manifests endpoint. Updated clients should check the Content-Type header to see whether the manifest returned from the endpoint is in the old format, or is an image manifest or manifest list in the new format.
Upvotes: 1