Skip to content

Commit

Permalink
cache docker types too
Browse files Browse the repository at this point in the history
Signed-off-by: Avi Deitcher <[email protected]>
  • Loading branch information
deitch committed Feb 22, 2021
1 parent ba88a87 commit dbb737e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/oras/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
orascontent "github.com/deislabs/oras/pkg/content"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/images"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
Expand Down Expand Up @@ -61,7 +62,7 @@ func (s *hybridStore) Writer(ctx context.Context, opts ...content.WriterOpt) (co
}
}

if isAllowedMediaType(wOpts.Desc.MediaType, ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex) || s.ingester == nil {
if isAllowedMediaType(wOpts.Desc.MediaType, ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex, images.MediaTypeDockerSchema2Manifest, images.MediaTypeDockerSchema2ManifestList) || s.ingester == nil {
return s.cache.Writer(ctx, opts...)
}
return s.ingester.Writer(ctx, opts...)
Expand Down

0 comments on commit dbb737e

Please sign in to comment.