From 698f71b415aa7f4d90772527d1bba6ae5fa4e912 Mon Sep 17 00:00:00 2001 From: Jun Lin Chen Date: Mon, 17 Jul 2023 03:55:06 +0000 Subject: [PATCH] ADD: one more image format --- proxy/extractor.go | 2 +- util/convertor.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/extractor.go b/proxy/extractor.go index 6416163..bb2e39b 100644 --- a/proxy/extractor.go +++ b/proxy/extractor.go @@ -225,7 +225,7 @@ func (ex *Extractor) SaveToC() (res *ApiResponse, err error) { return nil, errors.Wrapf(err, "failed to cache ToC") } - if desc.MediaType == types.DockerManifestSchema2 { + if desc.MediaType == types.DockerManifestSchema2 || desc.MediaType == types.OCIManifestSchema1 { // single manifest image // "application/vnd.docker.distribution.manifest.v2+json" diff --git a/util/convertor.go b/util/convertor.go index 76f633f..d068504 100644 --- a/util/convertor.go +++ b/util/convertor.go @@ -327,7 +327,7 @@ func (c *Convertor) ToStarlightImage() (err error) { return errors.Wrapf(err, "failed to read image") } - if imgDesc.MediaType == types.DockerManifestSchema2 { + if imgDesc.MediaType == types.DockerManifestSchema2 || imgDesc.MediaType == types.OCIManifestSchema1 { // single manifest image // "application/vnd.docker.distribution.manifest.v2+json" var (