Beispiel #1
0
func checkDns(env *config.Environment) error {
	addrs, err := net.LookupIP("somehost.docker")
	if err != nil {
		return errors.New("Unable to resolve somehost.docker. Run setup to fix DNS settings.")
	}

	if !util.IpSliceContains(addrs, env.DockerDaemonIp) {
		return errors.New("somehost.docker resolves to the wrong host. Run setup to fix DNS settings.")
	}
	return err
}
Beispiel #2
0
func dnsNeedsConfigure(envt *config.Environment) bool {
	addrs, err := net.LookupIP("ping.docker")
	return err != nil || !util.IpSliceContains(addrs, envt.DockerDaemonIp)
}