-
Notifications
You must be signed in to change notification settings - Fork 173
Also support manifest lists (multi-arch docker images, docker apps) #196
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
Conversation
can you add a test to verify this works, pulling one from docker hub should suffice, thanks! |
(used by docker apps) Signed-off-by: Nicolas De Loof <[email protected]>
added a test case to inspect a docker app of mine pushed as OCI index list on docker hub |
log content-type to help diagnostic on supported manifests' media types Signed-off-by: Nicolas De Loof <[email protected]>
Added a test case pulling a docker app of mine. some additional notes without extended Accept header, multi-arch docker image {
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"config": {
"mediaType": "application/vnd.docker.container.image.v1+json",
"size": 1497,
"digest": "sha256:19485c79a9bbdca205fce4f791efeaa2a103e23431434696cc54fdd939e9198d"
},
"layers": [
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 760770,
"digest": "sha256:7c9d20b9b6cda1c58bc4f9d6c401386786f584437abbe87e58910f8a9a15386b"
}
]
} which is actually the manifest for the linux/amd64 flavour of this image. With additional "manifest list" Accept header DockerHub do serve manifest for the same {
"manifests": [
{
"digest": "sha256:dd97a3fe6d721c5cf03abac0f50e2848dc583f7c4e41bf39102ceb42edfd1808",
"mediaType": "application\/vnd.docker.distribution.manifest.v2+json",
"platform": {
"architecture": "amd64",
"os": "linux"
},
"size": 527
},
...
],
"mediaType": "application\/vnd.docker.distribution.manifest.list.v2+json",
"schemaVersion": 2
} Then reg can be used to get manifest for the target architecture using So this PR will change Maybe we should just introduce a CLI option so that end-user can select Manifest type to query by registry API ? I suggest using |
Just notice this PR is duplicating #191 |
This let user tune the media type to be used to get manifest, without breaking compatibility. Signed-off-by: Nicolas De Loof <[email protected]>
@ndeloof Is there any way to extend this into the server command of reg as well? I'm reading through the code and can't quite figure out how I'd go about an update of this nature. I'm not a go dev and this feels like it might be easier for someone who's got more experience with such things. |
No description provided.