Open tleyden opened 8 years ago
When it's in the state that DNS stops working:
$ cat /etc/resolv.conf
nameserver 192.168.11.1
and pinging 192.168.11.1 does not return anything
After I restarted the default vm in virtualbox via right-click + Reset, and then restarted the container via docker start
and got into the container via docker exec
, the /etc/resolv.conf
file is now:
# cat /etc/resolv.conf
search couchbase
nameserver 192.168.1.1
nameserver 192.168.1.1
and DNS lookups work.
The second version of /etc/resolv.conf
is the same version as my OSX box /etc/resolv.conf
, whereas the non-working version:
# cat /etc/resolv.conf
nameserver 192.168.11.1
I'm not sure how this ended up getting generated. The OS inside the container is Ubuntu 14.04.3 LTS. Looks like the workaround should be to just update the /etc/resolv.conf
, which I'll try the next time it happens to me.
It's docker-machine
0.6.0, right?
I'm not sure how this ended up getting generated. The OS inside the container is Ubuntu 14.04.3 LTS. Looks like the workaround should be to just update the /etc/resolv.conf, which I'll try the next time it happens to me.
It's related to Virtualbox DNS settings, I think. Hopefully https://github.com/docker/machine/pull/3069 should help with this in the next release. In the interim if desired you can try your luck with something like:
$ docker-machine create -d virtualbox \
--virtualbox-host-dns-resolver \
--virtualbox-dns-proxy \
--virtualbox-memory 2048 \
default
Yeah:
$ docker-machine --version
docker-machine version 0.6.0, build e27fb87
Thanks, I'll give that a shot!
(Approximate) steps to reproduce:
docker run -ti centos /bin/bash
ping google.com
will hang, whereasping 8.8.8.8
returns immediatelyWorkaround
I have to completely reset the "default" VM in virtualbox.
Versions