summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-04-27 11:31:35 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-04-27 11:31:46 +0200
commiteab41cac6f77e32552838b16253ff23aad13c5a5 (patch)
tree8377a1412d7e4a07c6d5251ee23ab9b2144bb90c /cmd
parent1cd484e13ff4c4b137e1f63c3b9aec0f5e4ef504 (diff)
downloadpodman-eab41cac6f77e32552838b16253ff23aad13c5a5.tar.gz
podman-eab41cac6f77e32552838b16253ff23aad13c5a5.tar.bz2
podman-eab41cac6f77e32552838b16253ff23aad13c5a5.zip
podman: handle --no-healthcheck
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/common/specgen.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index ead67ee92..850fb11ec 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -203,10 +203,17 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
s.User = c.User
inputCommand := args[1:]
if len(c.HealthCmd) > 0 {
+ if c.NoHealthCheck {
+ return errors.New("Cannot specify both --no-healthcheck and --health-cmd")
+ }
s.HealthConfig, err = makeHealthCheckFromCli(c.HealthCmd, c.HealthInterval, c.HealthRetries, c.HealthTimeout, c.HealthStartPeriod)
if err != nil {
return err
}
+ } else if c.NoHealthCheck {
+ s.HealthConfig = &manifest.Schema2HealthConfig{
+ Test: []string{"NONE"},
+ }
}
userNS := ns.UsernsMode(c.UserNS)