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 Mar 12, 2021
1 parent 75801fe commit 6d12507
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 @@ -9,6 +9,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"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -64,7 +65,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 {
cacheWriter, err := s.cache.Writer(ctx, opts...)
if err != nil {
return nil, err
Expand Down

0 comments on commit 6d12507

Please sign in to comment.