Skip to content

Commit e766352

Browse files
committed
include services declared by links as implicit dependencies
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent db69856 commit e766352

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/compose/create.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ func prepareServicesDependsOn(p *types.Project) error {
173173
dependencies = append(dependencies, spec[0])
174174
}
175175

176+
for _, link := range service.Links {
177+
dependencies = append(dependencies, strings.Split(link, ":")[0])
178+
}
179+
176180
if len(dependencies) == 0 {
177181
continue
178182
}

0 commit comments

Comments
 (0)