From e766352d81c1389cd064b4677edc8a21c6a6f5db Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Fri, 8 Apr 2022 10:32:36 +0200 Subject: [PATCH] include services declared by `links` as implicit dependencies Signed-off-by: Nicolas De Loof --- pkg/compose/create.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/compose/create.go b/pkg/compose/create.go index 637d4c5ea..e5e23e29f 100644 --- a/pkg/compose/create.go +++ b/pkg/compose/create.go @@ -173,6 +173,10 @@ func prepareServicesDependsOn(p *types.Project) error { dependencies = append(dependencies, spec[0]) } + for _, link := range service.Links { + dependencies = append(dependencies, strings.Split(link, ":")[0]) + } + if len(dependencies) == 0 { continue }