optiopay / klar

Integration of Clair and Docker Registry
MIT License
506 stars 138 forks source link

Support for Image Manifest v2 #27

Closed furuholm closed 7 years ago

furuholm commented 7 years ago

As stated in PR #21 there have been braking changes to the manifest format when moving from "Image Manifest V 2, Schema 1" [1] to "Image Manifest V 2, Schema 2" [2].

The PR addressed requesting the new schema version, but there are more changes needed. This is probably causing the bug in #22 (sorry!).

The following changes to the manifest fields are relevant for Klar:

  1. name has been removed
  2. tag has been removed
  3. fsLayers has been renamed layers
  4. fsLayers.blobSum has been renamed layers.digest

PR #21 handles 1 and 2, but not 3 and 4.

The decoding of the manifest needs to be treated differently btw v1 and v2. The question is if the v1 or v2 terminology should be used. I can provide a new PR once this has been decided.

[1] - https://docs.docker.com/registry/spec/manifest-v2-1/#manifest-field-descriptions [2] - https://docs.docker.com/registry/spec/manifest-v2-2/#image-manifest-field-descriptions

hashmap commented 7 years ago

I assume we can close it @furuholm ?

furuholm commented 7 years ago

Yes. And thanks for accepting my PR!