3 ms·
This would've been immensely helpful a few months ago when I was writing a private OCI registry, which included parsing the OCI image layout. The registry I wro
by ezekg 2y ago
This would've been immensely helpful a few months ago when I was writing a private OCI registry, which included parsing the OCI image layout. The registry I wrote supports custom media types like OP discusses, but prefers OCI/Docker-specific ones when an accept header does not indicate a preference.
What I didn't know is that some descriptors don't always contain a media type... which my parser will currently reject. But then again, maybe that's fine? because it's an OCI registry, thus expects a spec-compliant image. iirc tools like Oras and Skopeo throw an error if the media type is not set i.e. a application/octet-stream content-type is sent. So I'm not sure how an artifact without a media type is expected to be used, since you can't really infer the content-type.