1
0
mirror of https://github.com/docker/cli.git synced 2026-01-18 08:21:31 +03:00

validate healthcheck params in daemon side

Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 406c6348b6
Component: cli
This commit is contained in:
allencloud
2017-01-17 15:55:45 +08:00
parent 60b21e3b0e
commit 2874513efc

View File

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