webdevops / vagrant-docker-vm

:computer: Development Vagrant VM with Docker, Samba and Mail sandbox (customizable)
https://webdevops.io/projects/vagrant-docker-vm/
MIT License
87 stars 28 forks source link

DNS-Resolve inside DEV-VM is not working with bento/ubuntu-16.04.5 #121

Open mediaessenz opened 5 years ago

mediaessenz commented 5 years ago

Because of this problem, all docker pull requests fail with this error:

Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 127.0.0.1:53: server misbehaving

When trying to log into the vagrant box using vargrant ssh and enter ping google.de the result is host unknown

I have an older DEV-VM installation with Bento/Ubuntu 16.04.3 running, which dosn't have this problem.

One (temporary) fix is to add a public dns server (eg. google dns 8.8.8.8) to the /etc/resolv.cnf file inside the build devvm.

josefglatz commented 5 years ago

I could reproduce the problem also without using any webdevops stuff when using bento/ubuntu-16.04


My workaround is to add the file <gitProjectRootFolder>/customization/etc/dnsmasq.d/upstream with the following content:

server=10.211.55.1
server=8.8.4.4
server=8.8.8.8

The first line depends on your vagrant provider. For me, I use Parallels and the automatically created shared network is 10.211.55.x. The 2nd and 3rd is the google dns.

The file is automatically created if you run a vagrant provision on your vagrant-docker-vm.

josefglatz commented 5 years ago

Today, I can't reproduce the problem in a clean vagrant environment with bento/ubuntu-16.04