Closed tianon closed 10 months ago
(I also have no idea what application/vnd.docker.container.image.v1+json
is, but it's not hurting anything being there :smile:)
Ah that's the image config for the example I linked -- probably doesn't need to be in the Accept
list, especially since it's only used for fetching manifests:
cc @rogpeppe
@tianon Thanks very much for the report! Should be fixed by https://review.gerrithub.io/c/cue-labs/oci/+/1176474.
https://github.com/cue-labs/oci/blob/14751940d5b22f24e01c024cc61a3138565f8c7e/ociregistry/ociclient/client.go#L216-L227
This is missing
application/vnd.docker.distribution.manifest.v2+json
, which means doing lookups on a registry which has funkyAccept:
behavior (like, say, Docker Hub) doesn't correctly fetch images built withdocker build
(classic, not buildkit/buildx) / pushed withdocker push
(without the new containerd integration enabled).I'm sure there are better examples, but the image I was testing and have handy is
winamd64/hello-world:nanoserver-ltsc2022
-- see https://explore.ggcr.dev/?image=winamd64/hello-world:nanoserver-ltsc2022Without adding
application/vnd.docker.distribution.manifest.v2+json
in that block of code I've linked above, I get Hub's automatically downgradedapplication/vnd.docker.distribution.manifest.v1+prettyjws
manifest instead, but it works fine when I add it (at first I thought it was the order of that list, but have confirmed it's just the entries missing the Docker v2 type).