Merge pull request #17325 from aboch/d0
Disable built-in SD on default bridge network
This commit is contained in:
commit
271f85afac
2 changed files with 4 additions and 4 deletions
|
@ -860,7 +860,7 @@ func (container *Container) buildCreateEndpointOptions(n libnetwork.Network) ([]
|
|||
createOptions = append(createOptions, libnetwork.EndpointOptionGeneric(genericOption))
|
||||
}
|
||||
|
||||
if n.Name() == "bridge" && !container.daemon.config().Bridge.InterContainerCommunication {
|
||||
if n.Name() == "bridge" {
|
||||
createOptions = append(createOptions, libnetwork.CreateOptionAnonymous())
|
||||
}
|
||||
|
||||
|
|
|
@ -409,8 +409,8 @@ func (s *DockerNetworkSuite) TestDockerNetworkDriverOptions(c *check.C) {
|
|||
|
||||
}
|
||||
|
||||
func (s *DockerDaemonSuite) TestDockerNetworkDiscoveryICCFalse(c *check.C) {
|
||||
// When icc == false, containers' etc/hosts should not be populated with containers' names
|
||||
func (s *DockerDaemonSuite) TestDockerNetworkNoDiscoveryDefaultBridgeNetwork(c *check.C) {
|
||||
// On default bridge network built-in service discovery should not happen
|
||||
hostsFile := "/etc/hosts"
|
||||
bridgeName := "external-bridge"
|
||||
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))
|
||||
defer deleteInterface(c, bridgeName)
|
||||
|
||||
err = s.d.StartWithBusybox("--bridge", bridgeName, "--icc=false")
|
||||
err = s.d.StartWithBusybox("--bridge", bridgeName)
|
||||
c.Assert(err, check.IsNil)
|
||||
defer s.d.Restart()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue