Przeglądaj źródła

include services declared by `links` as implicit dependencies

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 3 lat temu
rodzic
commit
e766352d81
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      pkg/compose/create.go

+ 4 - 0
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
 		}