Merge pull request #2769 from vbatts/none_bridge
Do not setup bridge ip if 'none' bridge is provided
This commit is contained in:
commit
d4c8fb9ee2
2 changed files with 7 additions and 1 deletions
|
@ -661,6 +661,9 @@ func (manager *NetworkManager) Allocate() (*NetworkInterface, error) {
|
|||
}
|
||||
|
||||
func (manager *NetworkManager) Close() error {
|
||||
if manager.disabled {
|
||||
return nil
|
||||
}
|
||||
err1 := manager.tcpPortAllocator.Close()
|
||||
err2 := manager.udpPortAllocator.Close()
|
||||
err3 := manager.ipAllocator.Close()
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue