api: fix a nil check on the wrong var

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
Albin Kerouanton 2023-10-25 09:40:18 +02:00
parent b4a08b3b7c
commit 70158284b7
No known key found for this signature in database
GPG key ID: 630B8E1DCBDB1864

View file

@ -544,7 +544,7 @@ func (s *containerRouter) postContainersCreate(ctx context.Context, w http.Respo
}
}
if hostConfig != nil && versions.LessThan(version, "1.44") {
if config != nil && versions.LessThan(version, "1.44") {
if config.Healthcheck != nil {
// StartInterval was added in API 1.44
config.Healthcheck.StartInterval = 0