зеркало из https://github.com/microsoft/docker.git
do not setup bridge ip if bridgeNetwork is nil. This is the case when
-b='none' bridge is provided. issue #2768 https://bugzilla.redhat.com/show_bug.cgi?id=1032094
This commit is contained in:
Родитель
f946a486ea
Коммит
60cb5f1a34
|
@ -63,7 +63,10 @@ func jobInitApi(job *engine.Job) string {
|
|||
}()
|
||||
job.Eng.Hack_SetGlobalVar("httpapi.server", srv)
|
||||
job.Eng.Hack_SetGlobalVar("httpapi.runtime", srv.runtime)
|
||||
job.Eng.Hack_SetGlobalVar("httpapi.bridgeIP", srv.runtime.networkManager.bridgeNetwork.IP)
|
||||
// https://github.com/dotcloud/docker/issues/2768
|
||||
if srv.runtime.networkManager.bridgeNetwork != nil {
|
||||
job.Eng.Hack_SetGlobalVar("httpapi.bridgeIP", srv.runtime.networkManager.bridgeNetwork.IP)
|
||||
}
|
||||
if err := job.Eng.Register("create", srv.ContainerCreate); err != nil {
|
||||
return err.Error()
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче