1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #17356 from HuKeping/warn-on-oom

Warning out when disalbe oom killer but not set the memory limit
This commit is contained in:
David Calavera 2015-11-23 12:43:04 -08:00
commit aa22191093

View file

@ -88,6 +88,10 @@ func (cli *DockerCli) CmdRun(args ...string) error {
os.Exit(125)
}
if hostConfig.OomKillDisable && hostConfig.Memory == 0 {
fmt.Fprintf(cli.err, "WARNING: Dangerous only disable the OOM Killer on containers but not set the '-m/--memory' option\n")
}
if len(hostConfig.DNS) > 0 {
// check the DNS settings passed via --dns against
// localhost regexp to warn if they are trying to