mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #33278 from tonistiigi/plugin-chroot
Use chrootarchive for plugin rootfs
This commit is contained in:
commit
6c05ceeb0b
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ import (
|
|||
"github.com/docker/docker/image"
|
||||
"github.com/docker/docker/layer"
|
||||
"github.com/docker/docker/pkg/archive"
|
||||
"github.com/docker/docker/pkg/chrootarchive"
|
||||
"github.com/docker/docker/pkg/progress"
|
||||
"github.com/opencontainers/go-digest"
|
||||
"github.com/pkg/errors"
|
||||
|
@ -143,7 +144,7 @@ func (dm *downloadManager) Download(ctx context.Context, initialRootFS image.Roo
|
|||
return initialRootFS, nil, err
|
||||
}
|
||||
digester := digest.Canonical.Digester()
|
||||
if _, err := archive.ApplyLayer(dm.tmpDir, io.TeeReader(inflatedLayerData, digester.Hash())); err != nil {
|
||||
if _, err := chrootarchive.ApplyLayer(dm.tmpDir, io.TeeReader(inflatedLayerData, digester.Hash())); err != nil {
|
||||
return initialRootFS, nil, err
|
||||
}
|
||||
initialRootFS.Append(layer.DiffID(digester.Digest()))
|
||||
|
|
Loading…
Reference in a new issue