diff options
Diffstat (limited to 'image')
-rw-r--r-- | image/image.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/image/image.go b/image/image.go index 25179a1c8a..af9563eeee 100644 --- a/image/image.go +++ b/image/image.go @@ -9,6 +9,7 @@ import ( "strings" "time" + "github.com/docker/distribution/reference" "github.com/docker/docker/api/types/container" "github.com/docker/docker/dockerversion" "github.com/docker/docker/layer" @@ -119,6 +120,7 @@ type Image struct { // Details provides additional image data type Details struct { + References []reference.Named Size int64 Metadata map[string]string Driver string @@ -199,6 +201,13 @@ type ChildConfig struct { Config *container.Config } +// NewImage creates a new image with the given ID +func NewImage(id ID) *Image { + return &Image{ + computedID: id, + } +} + // NewChildImage creates a new Image as a child of this image. func NewChildImage(img *Image, child ChildConfig, os string) *Image { isEmptyLayer := layer.IsEmpty(child.DiffID) |