diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-04-27 11:22:27 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-04-27 11:22:27 +0200 |
commit | 1cd484e13ff4c4b137e1f63c3b9aec0f5e4ef504 (patch) | |
tree | f11242cbbd7038a4142e491a146a164515bac455 /pkg | |
parent | 350727570b6f033c5c509a62ec8bfc4827e1c2fc (diff) | |
download | podman-1cd484e13ff4c4b137e1f63c3b9aec0f5e4ef504.tar.gz podman-1cd484e13ff4c4b137e1f63c3b9aec0f5e4ef504.tar.bz2 podman-1cd484e13ff4c4b137e1f63c3b9aec0f5e4ef504.zip |
specgen: read healthchecks from the image
if there is no healthcheck configuration specified, read it from the
image.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/specgen/generate/container.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go index 9797ad572..669b1f05f 100644 --- a/pkg/specgen/generate/container.go +++ b/pkg/specgen/generate/container.go @@ -25,6 +25,13 @@ func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerat return err } + if s.HealthConfig == nil { + s.HealthConfig, err = newImage.GetHealthCheck(ctx) + if err != nil { + return err + } + } + // Image stop signal if s.StopSignal == nil { stopSignal, err := newImage.StopSignal(ctx) |