mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
Properly autodetect Docker IP in Windows
Our Docker network plugin autodetection code was erroneously treating Window's default network `nat` as a plugin and defaulting to it instead of the host. Fixes #3218
This commit is contained in:
@@ -744,8 +744,9 @@ func (d *DockerDriver) detectIP(c *docker.Container) (string, bool) {
|
||||
ip = net.IPAddress
|
||||
ipName = name
|
||||
|
||||
// Don't auto-advertise bridge IPs
|
||||
if name != "bridge" {
|
||||
// Don't auto-advertise IPs for default networks (bridge on
|
||||
// Linux, nat on Windows)
|
||||
if name != "bridge" && name != "nat" {
|
||||
auto = true
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ does not automatically enable service discovery.
|
||||
behaves the same as `host` unless the driver determines its IP should be used.
|
||||
This setting was added in Nomad 0.6 and only supported by the Docker driver.
|
||||
It will advertise the container IP if a network plugin is used (e.g. weave).
|
||||
Support was added to the rkt driver in 0.7.
|
||||
|
||||
### `check` Parameters
|
||||
|
||||
|
||||
Reference in New Issue
Block a user