1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00

Merge pull request #30203 from allencloud/validate-healthcheck-params-in-daemon-side

validate healthcheck params in daemon side
This commit is contained in:
Brian Goff
2017-02-01 21:19:30 -05:00
committed by GitHub

View File

@@ -516,6 +516,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,