mirror of https://github.com/docker/compose.git
implement healthcheck.disable by setting Test: "NONE"
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
f34f49a16b
commit
907e8e1f24
|
@ -132,8 +132,12 @@ func ToMobyHealthCheck(check *compose.HealthCheckConfig) *container.HealthConfig
|
||||||
if check.Retries != nil {
|
if check.Retries != nil {
|
||||||
retries = int(*check.Retries)
|
retries = int(*check.Retries)
|
||||||
}
|
}
|
||||||
|
test := check.Test
|
||||||
|
if check.Disable {
|
||||||
|
test = []string{"NONE"}
|
||||||
|
}
|
||||||
return &container.HealthConfig{
|
return &container.HealthConfig{
|
||||||
Test: check.Test,
|
Test: test,
|
||||||
Interval: interval,
|
Interval: interval,
|
||||||
Timeout: timeout,
|
Timeout: timeout,
|
||||||
StartPeriod: period,
|
StartPeriod: period,
|
||||||
|
|
Loading…
Reference in New Issue