Merge pull request #17274 from aboch/ai
Turn off discovery when icc == false Upstream-commit: 2afdc6582b203c2beaeaca6ff14f61ae50f8cab9 Component: engine
This commit is contained in:
@@ -783,7 +783,7 @@ func (container *Container) updateNetwork() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (container *Container) buildCreateEndpointOptions() ([]libnetwork.EndpointOption, error) {
|
||||
func (container *Container) buildCreateEndpointOptions(n libnetwork.Network) ([]libnetwork.EndpointOption, error) {
|
||||
var (
|
||||
portSpecs = make(nat.PortSet)
|
||||
bindings = make(nat.PortMap)
|
||||
@@ -861,6 +861,10 @@ func (container *Container) buildCreateEndpointOptions() ([]libnetwork.EndpointO
|
||||
createOptions = append(createOptions, libnetwork.EndpointOptionGeneric(genericOption))
|
||||
}
|
||||
|
||||
if n.Name() == "bridge" && !container.daemon.config().Bridge.InterContainerCommunication {
|
||||
createOptions = append(createOptions, libnetwork.CreateOptionAnonymous())
|
||||
}
|
||||
|
||||
return createOptions, nil
|
||||
}
|
||||
|
||||
@@ -950,7 +954,7 @@ func (container *Container) connectToNetwork(idOrName string, updateSettings boo
|
||||
return err
|
||||
}
|
||||
|
||||
createOptions, err := container.buildCreateEndpointOptions()
|
||||
createOptions, err := container.buildCreateEndpointOptions(n)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user