From 907e8e1f24f59beb653b57af66439194c5a9a969 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Tue, 1 Jun 2021 16:10:20 +0200 Subject: [PATCH] implement healthcheck.disable by setting Test: "NONE" Signed-off-by: Nicolas De Loof --- local/moby/convert.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/local/moby/convert.go b/local/moby/convert.go index 39443ebeb..02c265d47 100644 --- a/local/moby/convert.go +++ b/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,