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>
This commit is contained in:
Giuseppe Scrivano 2020-04-27 11:22:27 +02:00
parent 350727570b
commit 1cd484e13f
No known key found for this signature in database
GPG Key ID: E4730F97F60286ED
1 changed files with 7 additions and 0 deletions

View File

@ -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)