16 ms·
> Images are basically content addressed Not really. You can use digests to distinguish a version of a particular repository/image, but you cannot address anyt
by jacques_chester 6y ago
> Images are basically content addressed
Not really. You can use digests to distinguish a version of a particular repository/image, but you cannot address anything with just the digest.
- ithkuil 6y agoThat's why I said "basically". /v2/<name>/blobs/<digest> The spec is ambiguous about what to do if a blob with a matching digest is found in the registry but not in the repository namespace <name>. The layer deduplication section of the spec does state that the same blob MUST be shared between repositories. The manifest digest endpoint suffers from a similar ambiguity. In any case, all I wanted to say is that it would have been quite possible to implement docker registry as a purely content addressed store + a key/value layer that binds human readable names to it. It's almost, but not quite that.
- jacques_chester 6y agoI don't think it's basically CAS at all. You need the name in advance before you can narrow it down with the digest.
- ithkuil 6y agoMy point is that it would have been trivial to define the registry protocol to just require the digest. Do you see any reason why a pure content addressed registry protocol could have not existed?
- jacques_chester 6y agoNo, I absolutely agree with you. It could have been a CAS design, but right it's not. It would take a V3 of the Registry API -- I commented on that in the DigitalOcean thread: https://news.ycombinator.com/item?id=24983077 https://news.ycombinator.com/item?id=24983077