mirror of https://github.com/docker/docs.git
Merge pull request #22856 from thaJeztah/dont-warn-when-net-none
Suppress "IPv4 forwarding" warning for --net=none
This commit is contained in:
commit
3ab9049be3
|
|
@ -489,8 +489,8 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
|
||||||
return warnings, fmt.Errorf("Invalid value %d, range for oom score adj is [-1000, 1000]", hostConfig.OomScoreAdj)
|
return warnings, fmt.Errorf("Invalid value %d, range for oom score adj is [-1000, 1000]", hostConfig.OomScoreAdj)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ip-forwarding does not affect container with '--net=host'
|
// ip-forwarding does not affect container with '--net=host' (or '--net=none')
|
||||||
if sysInfo.IPv4ForwardingDisabled && !hostConfig.NetworkMode.IsHost() {
|
if sysInfo.IPv4ForwardingDisabled && !(hostConfig.NetworkMode.IsHost() || hostConfig.NetworkMode.IsNone()) {
|
||||||
warnings = append(warnings, "IPv4 forwarding is disabled. Networking will not work.")
|
warnings = append(warnings, "IPv4 forwarding is disabled. Networking will not work.")
|
||||||
logrus.Warnf("IPv4 forwarding is disabled. Networking will not work")
|
logrus.Warnf("IPv4 forwarding is disabled. Networking will not work")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue