fix: MetaDB fixes related to Docker media types (#2934)

* fix: update download counters for docker media types

closes #2929

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* fix: handle docker config mediatype in MetaDB

The OS/Arch/Layer History information was not written to MetaDB

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

---------

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
Andrei Aaron
2025-02-03 08:29:55 +02:00
committed by GitHub
parent 4fcd1079f7
commit ea6b6dab23
5 changed files with 272 additions and 3 deletions
+14
View File
@@ -45,6 +45,20 @@ func IsCompatibleManifestListMediaType(mediatype string) bool {
return false
}
func CompatibleConfigMediaTypes() []string {
return []string{docker.MediaTypeImageConfig}
}
func IsCompatibleConfigMediaType(mediatype string) bool {
for _, mt := range CompatibleConfigMediaTypes() {
if mt == mediatype {
return true
}
}
return false
}
func Validate(body []byte, mediaType string) ([]v1.Descriptor, error) {
switch mediaType {
case docker.MediaTypeManifest: