mirror of https://github.com/docker/docs.git
Merge pull request #17325 from aboch/d0
Disable built-in SD on default bridge network
This commit is contained in:
commit
271f85afac
|
@ -860,7 +860,7 @@ func (container *Container) buildCreateEndpointOptions(n libnetwork.Network) ([]
|
||||||
createOptions = append(createOptions, libnetwork.EndpointOptionGeneric(genericOption))
|
createOptions = append(createOptions, libnetwork.EndpointOptionGeneric(genericOption))
|
||||||
}
|
}
|
||||||
|
|
||||||
if n.Name() == "bridge" && !container.daemon.config().Bridge.InterContainerCommunication {
|
if n.Name() == "bridge" {
|
||||||
createOptions = append(createOptions, libnetwork.CreateOptionAnonymous())
|
createOptions = append(createOptions, libnetwork.CreateOptionAnonymous())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -409,8 +409,8 @@ func (s *DockerNetworkSuite) TestDockerNetworkDriverOptions(c *check.C) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerDaemonSuite) TestDockerNetworkDiscoveryICCFalse(c *check.C) {
|
func (s *DockerDaemonSuite) TestDockerNetworkNoDiscoveryDefaultBridgeNetwork(c *check.C) {
|
||||||
// When icc == false, containers' etc/hosts should not be populated with containers' names
|
// On default bridge network built-in service discovery should not happen
|
||||||
hostsFile := "/etc/hosts"
|
hostsFile := "/etc/hosts"
|
||||||
bridgeName := "external-bridge"
|
bridgeName := "external-bridge"
|
||||||
bridgeIP := "192.169.255.254/24"
|
bridgeIP := "192.169.255.254/24"
|
||||||
|
@ -418,7 +418,7 @@ func (s *DockerDaemonSuite) TestDockerNetworkDiscoveryICCFalse(c *check.C) {
|
||||||
c.Assert(err, check.IsNil, check.Commentf(out))
|
c.Assert(err, check.IsNil, check.Commentf(out))
|
||||||
defer deleteInterface(c, bridgeName)
|
defer deleteInterface(c, bridgeName)
|
||||||
|
|
||||||
err = s.d.StartWithBusybox("--bridge", bridgeName, "--icc=false")
|
err = s.d.StartWithBusybox("--bridge", bridgeName)
|
||||||
c.Assert(err, check.IsNil)
|
c.Assert(err, check.IsNil)
|
||||||
defer s.d.Restart()
|
defer s.d.Restart()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue