Signed-off-by: msabansal <sabansal@microsoft.com>
| ... | ... |
@@ -511,7 +511,7 @@ func (daemon *Daemon) updateNetworkConfig(container *container.Container, idOrNa |
| 511 | 511 |
} |
| 512 | 512 |
|
| 513 | 513 |
if !containertypes.NetworkMode(idOrName).IsUserDefined() {
|
| 514 |
- if hasUserDefinedIPAddress(endpointConfig) {
|
|
| 514 |
+ if hasUserDefinedIPAddress(endpointConfig) && !enableIPOnPredefinedNetwork() {
|
|
| 515 | 515 |
return nil, runconfig.ErrUnsupportedNetworkAndIP |
| 516 | 516 |
} |
| 517 | 517 |
if endpointConfig != nil && len(endpointConfig.Aliases) > 0 {
|
| ... | ... |
@@ -383,3 +383,7 @@ func isLinkable(child *container.Container) bool {
|
| 383 | 383 |
func errRemovalContainer(containerID string) error {
|
| 384 | 384 |
return fmt.Errorf("Container %s is marked for removal and cannot be connected or disconnected to the network", containerID)
|
| 385 | 385 |
} |
| 386 |
+ |
|
| 387 |
+func enableIPOnPredefinedNetwork() bool {
|
|
| 388 |
+ return false |
|
| 389 |
+} |