summaryrefslogtreecommitdiff
path: root/daemon/containerd/image.go
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/containerd/image.go')
-rw-r--r--daemon/containerd/image.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/daemon/containerd/image.go b/daemon/containerd/image.go
index d15369185e..8ced6436f5 100644
--- a/daemon/containerd/image.go
+++ b/daemon/containerd/image.go
@@ -68,6 +68,21 @@ func (i *ImageService) GetImage(ctx context.Context, refOrID string, options ima
exposedPorts[nat.Port(k)] = v
}
+ var imgHistory []image.History
+ for _, h := range ociimage.History {
+ var created time.Time
+ if h.Created != nil {
+ created = *h.Created
+ }
+ imgHistory = append(imgHistory, image.History{
+ Created: created,
+ Author: h.Author,
+ CreatedBy: h.CreatedBy,
+ Comment: h.Comment,
+ EmptyLayer: h.EmptyLayer,
+ })
+ }
+
img := image.NewImage(image.ID(desc.Digest))
img.V1Image = image.V1Image{
ID: string(desc.Digest),
@@ -87,6 +102,7 @@ func (i *ImageService) GetImage(ctx context.Context, refOrID string, options ima
}
img.RootFS = rootfs
+ img.History = imgHistory
if options.Details {
lastUpdated := time.Unix(0, 0)