1
0
Эх сурвалжийг харах

implement healthcheck.disable by setting Test: "NONE"

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 4 жил өмнө
parent
commit
907e8e1f24
1 өөрчлөгдсөн 5 нэмэгдсэн , 1 устгасан
  1. 5 1
      local/moby/convert.go

+ 5 - 1
local/moby/convert.go

@@ -132,8 +132,12 @@ func ToMobyHealthCheck(check *compose.HealthCheckConfig) *container.HealthConfig
 	if check.Retries != nil {
 		retries = int(*check.Retries)
 	}
+	test := check.Test
+	if check.Disable {
+		test = []string{"NONE"}
+	}
 	return &container.HealthConfig{
-		Test:        check.Test,
+		Test:        test,
 		Interval:    interval,
 		Timeout:     timeout,
 		StartPeriod: period,