code: func warnOnLocalhostDNS(hostConfig container.HostConfig, stderr io.Writer) {
  	for _, dnsIP := range hostConfig.DNS {
  		if isLocalhost(dnsIP) {
  			fmt.Fprintf(stderr, "WARNING: Localhost DNS setting (--dns=%s) may fail in containers.\n", dnsIP)
  			return
  		}
  	}
  }
docs: // check the DNS settings passed via --dns against localhost regexp to warn if
  // they are trying to set a DNS to a localhost address