mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 12:58:02 +08:00
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:
+3
-1
@@ -7,6 +7,7 @@ import (
|
||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
|
||||
zcommon "zotregistry.dev/zot/pkg/common"
|
||||
"zotregistry.dev/zot/pkg/compat"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
mTypes "zotregistry.dev/zot/pkg/meta/types"
|
||||
"zotregistry.dev/zot/pkg/storage"
|
||||
@@ -117,7 +118,8 @@ func OnGetManifest(name, reference, mediaType string, body []byte,
|
||||
return nil
|
||||
}
|
||||
|
||||
if !(mediaType == v1.MediaTypeImageManifest || mediaType == v1.MediaTypeImageIndex) {
|
||||
if !(mediaType == v1.MediaTypeImageManifest || mediaType == v1.MediaTypeImageIndex ||
|
||||
compat.IsCompatibleManifestMediaType(mediaType) || compat.IsCompatibleManifestListMediaType(mediaType)) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -321,7 +321,8 @@ func SetImageMetaFromInput(ctx context.Context, repo, reference, mediaType strin
|
||||
return err
|
||||
}
|
||||
|
||||
if manifestContent.Config.MediaType == ispec.MediaTypeImageConfig {
|
||||
if manifestContent.Config.MediaType == ispec.MediaTypeImageConfig ||
|
||||
compat.IsCompatibleConfigMediaType(manifestContent.Config.MediaType) {
|
||||
configBlob, err := imageStore.GetBlobContent(repo, manifestContent.Config.Digest)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user