devilbox: Auto-DNS not working properly
Hi,
I have pulled today latest image and all works well except auto-dns feature. Under php 7.1, apache 2.4, Docker version 17.09.0-ce, build afdb6d4 and osx high sierra when I set nameserver 127.0.0.1 in resolv.conf, flush the dns cache, delete the container and run compose up virtualhosts are not properly resolved. If I place them in hosts file all works well. Any suggestions for further debugging? I left DEBUG_COMPOSE_ENTRYPOINT=1 and checked the log but everything seems fine, no errors on the screen so far.
Also after wifi reconnect on osx of dns are changed and file completely wiped, so this means that I have to add localhost on each wifi reconnect…
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 49 (24 by maintainers)
I encountered the same issue and tried the DVL-013-fix-dns branch (with merging master). The branch works for me with a few caveats. By the way, I’m running macOS 10.13.2 (High Sierra) with Docker Edge.
When using the Auto-DNS configuration, I can’t use
localas a search domain with anydocker-composecommand (i.e.up,down,rm, etc). I either need to remove thelocalsearch domain or rename it to something fromlocalto anything else… likelocalhostthen the commands would continue to go through. (At first, I thought it was coincidence, but running anydocker-composecommand in devilbox it looked like the command would hang until I elimited thelocalsearch domain.)That said, once devilbox was up, in order for Auto-DNS to work, I had to re-add the
localsearch domain. Once I did that, it resolved just fine (and my webpage loaded without issue).Also, I didn’t realize this in macOS, but modifying
/etc/resolv.confdoesn’t work. I had to modify my DNS through the normal DNS config under Network. Once you hitApply,/etc/resolv.confupdates immediately. So all my testing I did was through that.By the way, this branch with the caveats still work even if I restart docker or bring devilbox
downandupagain.