mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix copy when used with scratch and images with empty RootFS
Commit the rwLayer to get the correct DiffID Refacator copy in thebuilder move more code into exportImage cleanup some windows tests Release the newly commited layer. Set the imageID on the buildStage after exporting a new image. Move archiver to BuildManager. Have ReleaseableLayer.Commit return a layer and store the Image from exportImage in the local imageSources cache Remove NewChild from image interface. Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
ecd44d23cc
commit
5136096520
20 changed files with 319 additions and 180 deletions
|
|
@ -2,7 +2,6 @@ package image
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
|
|
@ -10,6 +9,7 @@ import (
|
|||
"github.com/docker/distribution/digestset"
|
||||
"github.com/docker/docker/layer"
|
||||
"github.com/opencontainers/go-digest"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// Store is an interface for creating and accessing images
|
||||
|
|
@ -147,7 +147,7 @@ func (is *store) Create(config []byte) (ID, error) {
|
|||
if layerID != "" {
|
||||
l, err = is.ls.Get(layerID)
|
||||
if err != nil {
|
||||
return "", err
|
||||
return "", errors.Wrapf(err, "failed to get layer %s", layerID)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue