summaryrefslogtreecommitdiff
path: root/libpod/image/image.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/image/image.go')
-rw-r--r--libpod/image/image.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go
index 6ea49e2a9..355249b12 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -831,7 +831,8 @@ func (i *Image) History(ctx context.Context) ([]*History, error) {
id := "<missing>"
if x == numHistories {
id = i.ID()
- } else if layer != nil {
+ }
+ if layer != nil {
if !oci.History[x].EmptyLayer {
size = layer.UncompressedSize
}
@@ -1012,6 +1013,15 @@ func (i *Image) Inspect(ctx context.Context) (*inspect.ImageData, error) {
History: ociv1Img.History,
NamesHistory: i.NamesHistory(),
}
+ if manifestType == manifest.DockerV2Schema2MediaType {
+ hc, err := i.GetHealthCheck(ctx)
+ if err != nil {
+ return nil, err
+ }
+ if hc != nil {
+ data.HealthCheck = hc
+ }
+ }
return data, nil
}