Update layer apply to use containerd archive

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2017-02-07 17:01:43 -08:00
parent 0deba01621
commit f0a43e72cd
2 changed files with 18 additions and 4 deletions

11
cmd/dist/apply.go vendored
View file

@ -4,8 +4,9 @@ import (
contextpkg "context"
"os"
"github.com/docker/containerd/archive"
"github.com/docker/containerd/log"
"github.com/docker/docker/pkg/archive"
dockerarchive "github.com/docker/docker/pkg/archive"
"github.com/urfave/cli"
)
@ -21,7 +22,13 @@ var applyCommand = cli.Command{
)
log.G(ctx).Info("applying layer from stdin")
if _, err := archive.ApplyLayer(dir, os.Stdin); err != nil {
rd, err := dockerarchive.DecompressStream(os.Stdin)
if err != nil {
return err
}
if _, err := archive.ApplyDiffTar(ctx, dir, rd); err != nil {
return err
}