Simplify docker importer

Support any layout and rely on manifest.json to reference blobs

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2018-09-11 18:34:25 -07:00
parent 9e6db71954
commit bce20b75da
5 changed files with 179 additions and 260 deletions

View File

@@ -20,6 +20,7 @@ import (
"runtime"
"testing"
"github.com/containerd/containerd/images/docker"
"github.com/containerd/containerd/images/oci"
)
@@ -51,7 +52,7 @@ func TestOCIExportAndImport(t *testing.T) {
opts := []ImportOpt{
WithImporter(&oci.V1Importer{}),
WithImageRefTranslator(oci.RefTranslator("foo/bar")),
WithImageRefTranslator(docker.RefTranslator("foo/bar", false)),
}
imgrecs, err := client.Import(ctx, exported, opts...)
if err != nil {