docker-machine-driver-xhyve icon indicating copy to clipboard operation
docker-machine-driver-xhyve copied to clipboard

DNS Configuration doesn't include local network DNS

Open kevinkirkup opened this issue 7 years ago • 5 comments

I'm working in a corporate network and I need to have the VM hosting the docker daemon to include the DNS servers for our network, otherwise I can't download the OpenShift/Kubernetes images to start a cluster in minikube/minishift.

This doesn't seem to be and issue when I use docker-machine.

I've been able to get around this by adding the DNS servers to resolve.conf and resolved.conf after the VM has been created. Due to changes in minishift however, this no longer works.

Is there a way to specify addition DNS servers that can be configured? Is there a configuration that I should be checking?

Version Info

% brew info docker-machine-driver-xhyve
docker-machine-driver-xhyve: stable 0.3.3 (bottled), HEAD
Docker Machine driver for xhyve
https://github.com/zchee/docker-machine-driver-xhyve
/usr/local/Cellar/docker-machine-driver-xhyve/0.3.3 (3 files, 10.3MB) *
  Poured from bottle on 2017-06-30 at 08:53:44
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/docker-machine-driver-xhyve.rb
==> Dependencies
Build: go ✔
Required: opam ✔, libev ✔
Recommended: docker-machine ✔
==> Requirements
Build: git ✔
Required: macOS >= 10.10 ✔
==> Options
--without-docker-machine
	Build without docker-machine support
--without-qcow2
	Do not support qcow2 disk image format
--HEAD
	Install HEAD version
==> Caveats
This driver requires superuser privileges to access the hypervisor. To
enable, execute
    sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
    sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

kevinkirkup avatar Jun 30 '17 13:06 kevinkirkup

Looks like this was being caused by having dnsmasq enabled. Not sure why that would be though. After disabling dnsmasq everything seems to be working correctly.

kevinkirkup avatar Jun 30 '17 16:06 kevinkirkup

@kevinkirkup Thanks for advice. I’ll check this isuue later.

zchee avatar Jul 01 '17 06:07 zchee

I just hit the same issue and have been wasting hours trying to figure out why I could not build an image inside minikube when following the tutorial - I kept getting errors "read: connection refused" when trying to pull an image off of dockerhub. This post guided me to turning off dnsmasq, which I forgot I even had on this laptop, CHEERS!

jasonmacdonald avatar Oct 21 '17 21:10 jasonmacdonald

@kevinkirkup @jasonmacdonald thanks a lot, disabling dnsmasq helped me too. Dnsmasq was installed as dependency to valet to service .dev domain. Is there any way to make them work simultaneously?

igostv avatar Oct 31 '17 04:10 igostv

@kevinkirkup if you're using local dnsmasq, you need to tell the dnsmasq listen docker host interface as well.

 ~ cat /usr/local/etc/dnsmasq.conf |grep -i listen-add
#listen-address=
listen-address=127.0.0.1
listen-address=192.168.64.1

don't forget to reload dnsmasq service, after editing configuration file.

roadrunner avatar Dec 31 '17 20:12 roadrunner