mirror of https://github.com/docker/compose.git
Merge pull request #1616 from ndeloof/pid_namespace
handle dependency involved by shared PID namespace
This commit is contained in:
commit
7d43d39de2
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue