Merge pull request #18727 from tonistiigi/partial-load
Add support for partial load
This commit is contained in:
commit
6ee7c94263
1 changed files with 7 additions and 2 deletions
|
@ -73,9 +73,14 @@ func (l *tarexporter) Load(inTar io.ReadCloser, outStream io.Writer) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
newLayer, err := l.loadLayer(layerPath, rootFS)
|
||||
r := rootFS
|
||||
r.Append(diffID)
|
||||
newLayer, err := l.ls.Get(r.ChainID())
|
||||
if err != nil {
|
||||
return err
|
||||
newLayer, err = l.loadLayer(layerPath, rootFS)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
defer layer.ReleaseAndLog(l.ls, newLayer)
|
||||
if expected, actual := diffID, newLayer.DiffID(); expected != actual {
|
||||
|
|
Loading…
Reference in a new issue