exporter: support unpack opt for image exporter

It is enhancement which allows to unpack image into containerd
snapshotter storage by `--output type=image,<.>=<.>,unpack=true`.

In order to support this feature, we needs to extend the Snapshotter
witwh `Name() string` function. Because we needs to set gc label for
snapshotter which need snapshotter name.

fix: #908

Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
Wei Fu
2019-03-28 17:26:34 +08:00
parent 6085a25a2f
commit ffad8ada79
13 changed files with 159 additions and 34 deletions

View File

@@ -315,7 +315,7 @@ func newHTTPSource(tmpdir string) (source.Source, error) {
}
cm, err := cache.NewManager(cache.ManagerOpt{
Snapshotter: snapshot.FromContainerdSnapshotter(snapshotter, nil),
Snapshotter: snapshot.FromContainerdSnapshotter("native", snapshotter, nil),
MetadataStore: md,
})
if err != nil {