From a93008ab1cfc5a6c6c9574acff1e52f532378a6b Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Thu, 29 Apr 2021 21:48:20 +0200 Subject: [PATCH] handle dependency involved by shared PID namespace Signed-off-by: Nicolas De Loof --- local/compose/create.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/local/compose/create.go b/local/compose/create.go index 56b8adad9..6670ba1bd 100644 --- a/local/compose/create.go +++ b/local/compose/create.go @@ -144,15 +144,16 @@ outLoop: for i := range p.Services { networkDependency := getDependentServiceFromMode(p.Services[i].NetworkMode) ipcDependency := getDependentServiceFromMode(p.Services[i].Ipc) + pidDependency := getDependentServiceFromMode(p.Services[i].Pid) - if networkDependency == "" && ipcDependency == "" { + if networkDependency == "" && ipcDependency == "" && pidDependency == "" { continue } if p.Services[i].DependsOn == nil { p.Services[i].DependsOn = make(types.DependsOnConfig) } for _, service := range p.Services { - if service.Name == networkDependency || service.Name == ipcDependency { + if service.Name == networkDependency || service.Name == ipcDependency || service.Name == pidDependency { p.Services[i].DependsOn[service.Name] = types.ServiceDependency{ Condition: types.ServiceConditionStarted, }