|
@@ -14,6 +14,7 @@ import (
|
|
"github.com/docker/docker/image"
|
|
"github.com/docker/docker/image"
|
|
"github.com/docker/docker/pkg/archive"
|
|
"github.com/docker/docker/pkg/archive"
|
|
"github.com/docker/docker/pkg/chrootarchive"
|
|
"github.com/docker/docker/pkg/chrootarchive"
|
|
|
|
+ "github.com/docker/docker/utils"
|
|
)
|
|
)
|
|
|
|
|
|
// Loads a set of images into the repository. This is the complementary of ImageExport.
|
|
// Loads a set of images into the repository. This is the complementary of ImageExport.
|
|
@@ -114,6 +115,10 @@ func (s *TagStore) recursiveLoad(eng *engine.Engine, address, tmpImageDir string
|
|
log.Debugf("Error unmarshalling json", err)
|
|
log.Debugf("Error unmarshalling json", err)
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
+ if err := utils.ValidateID(img.ID); err != nil {
|
|
|
|
+ log.Debugf("Error validating ID: %s", err)
|
|
|
|
+ return err
|
|
|
|
+ }
|
|
if img.Parent != "" {
|
|
if img.Parent != "" {
|
|
if !s.graph.Exists(img.Parent) {
|
|
if !s.graph.Exists(img.Parent) {
|
|
if err := s.recursiveLoad(eng, img.Parent, tmpImageDir); err != nil {
|
|
if err := s.recursiveLoad(eng, img.Parent, tmpImageDir); err != nil {
|