summaryrefslogtreecommitdiff
path: root/pkg/inspect
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-01-26 16:00:32 -0600
committerBrent Baude <bbaude@redhat.com>2020-01-27 08:36:25 -0600
commit6181faa90de3a166004cca4fb6a8d85c17cbfe53 (patch)
treea47af8dbcfc1f01141b1d1ebc72d1cf88dabeea0 /pkg/inspect
parent40d36b1cf11be8f6e102a4bf28144d33082b453a (diff)
downloadpodman-6181faa90de3a166004cca4fb6a8d85c17cbfe53.tar.gz
podman-6181faa90de3a166004cca4fb6a8d85c17cbfe53.tar.bz2
podman-6181faa90de3a166004cca4fb6a8d85c17cbfe53.zip
inspect image healthchecks
when a docker image has a defined healthcheck, it should be displayed with inspect. this is only valid for docker images as oci images are not aware of healthchecks. Fixes: #4799 Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/inspect')
-rw-r--r--pkg/inspect/inspect.go46
1 files changed, 24 insertions, 22 deletions
diff --git a/pkg/inspect/inspect.go b/pkg/inspect/inspect.go
index 8249dc4aa..569f208d9 100644
--- a/pkg/inspect/inspect.go
+++ b/pkg/inspect/inspect.go
@@ -3,6 +3,7 @@ package inspect
import (
"time"
+ "github.com/containers/image/v5/manifest"
"github.com/containers/libpod/libpod/driver"
"github.com/opencontainers/go-digest"
"github.com/opencontainers/image-spec/specs-go/v1"
@@ -10,28 +11,29 @@ import (
// ImageData holds the inspect information of an image
type ImageData struct {
- ID string `json:"Id"`
- Digest digest.Digest `json:"Digest"`
- RepoTags []string `json:"RepoTags"`
- RepoDigests []string `json:"RepoDigests"`
- Parent string `json:"Parent"`
- Comment string `json:"Comment"`
- Created *time.Time `json:"Created"`
- Config *v1.ImageConfig `json:"Config"`
- Version string `json:"Version"`
- Author string `json:"Author"`
- Architecture string `json:"Architecture"`
- Os string `json:"Os"`
- Size int64 `json:"Size"`
- VirtualSize int64 `json:"VirtualSize"`
- GraphDriver *driver.Data `json:"GraphDriver"`
- RootFS *RootFS `json:"RootFS"`
- Labels map[string]string `json:"Labels"`
- Annotations map[string]string `json:"Annotations"`
- ManifestType string `json:"ManifestType"`
- User string `json:"User"`
- History []v1.History `json:"History"`
- NamesHistory []string `json:"NamesHistory"`
+ ID string `json:"Id"`
+ Digest digest.Digest `json:"Digest"`
+ RepoTags []string `json:"RepoTags"`
+ RepoDigests []string `json:"RepoDigests"`
+ Parent string `json:"Parent"`
+ Comment string `json:"Comment"`
+ Created *time.Time `json:"Created"`
+ Config *v1.ImageConfig `json:"Config"`
+ Version string `json:"Version"`
+ Author string `json:"Author"`
+ Architecture string `json:"Architecture"`
+ Os string `json:"Os"`
+ Size int64 `json:"Size"`
+ VirtualSize int64 `json:"VirtualSize"`
+ GraphDriver *driver.Data `json:"GraphDriver"`
+ RootFS *RootFS `json:"RootFS"`
+ Labels map[string]string `json:"Labels"`
+ Annotations map[string]string `json:"Annotations"`
+ ManifestType string `json:"ManifestType"`
+ User string `json:"User"`
+ History []v1.History `json:"History"`
+ NamesHistory []string `json:"NamesHistory"`
+ HealthCheck *manifest.Schema2HealthConfig `json:"Healthcheck,omitempty"`
}
// RootFS holds the root fs information of an image