mirror of
https://github.com/containers/podman.git
synced 2025-06-21 17:38:12 +08:00
podman: handle --no-healthcheck
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -203,10 +203,17 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
|
|||||||
s.User = c.User
|
s.User = c.User
|
||||||
inputCommand := args[1:]
|
inputCommand := args[1:]
|
||||||
if len(c.HealthCmd) > 0 {
|
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)
|
s.HealthConfig, err = makeHealthCheckFromCli(c.HealthCmd, c.HealthInterval, c.HealthRetries, c.HealthTimeout, c.HealthStartPeriod)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
} else if c.NoHealthCheck {
|
||||||
|
s.HealthConfig = &manifest.Schema2HealthConfig{
|
||||||
|
Test: []string{"NONE"},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
userNS := ns.UsernsMode(c.UserNS)
|
userNS := ns.UsernsMode(c.UserNS)
|
||||||
|
Reference in New Issue
Block a user