mirror of https://github.com/docker/cli.git
validate healthcheck params in daemon side
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
53edcd37a2
commit
406c6348b6
|
@ -511,6 +511,9 @@ func parse(flags *pflag.FlagSet, copts *containerOptions) (*container.Config, *c
|
|||
if copts.healthTimeout < 0 {
|
||||
return nil, nil, nil, fmt.Errorf("--health-timeout cannot be negative")
|
||||
}
|
||||
if copts.healthRetries < 0 {
|
||||
return nil, nil, nil, fmt.Errorf("--health-retries cannot be negative")
|
||||
}
|
||||
|
||||
healthConfig = &container.HealthConfig{
|
||||
Test: probe,
|
||||
|
|
Loading…
Reference in New Issue