Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

drude with dns-gen #93

Open
christianwiedemann opened this issue Mar 12, 2016 · 3 comments
Open

drude with dns-gen #93

christianwiedemann opened this issue Mar 12, 2016 · 3 comments

Comments

@christianwiedemann
Copy link

Hi,
I am using drude with dns-gen on mac and on linux. I think this configuration has some advantages against nginx-proxy and blinkreaction/dns-discovery in an local multi project dev environment.

I can provide a installation instruction and a new vagrant file for mac and a installtion instruction for ubuntu 15.10

Maybe that can be an installaton option for drude? What do you think?

Thanks

@lmakarov
Copy link
Owner

Hi @christianwiedemann,

Would you share your setup and config details?
What are the local multi project use cases, that you think are not currently covered by Drude or can be handled better?

@christianwiedemann
Copy link
Author

Hi @lmakarov
sorry for my late response. First I want to thank you for dsh. It has completely improved the local dev process at my company.

The advantage of the dns configuration is that you can access the containers directly. So it is easier and more straight forward to connect to mysql or any other databases. Also xdebug etc. can be accessed on port 9000.
As a consequence every non http service can be accessed by domain name. You need no longer static ips in your docker-compose files.
And it is possible to configure own domain names (Not important but nice).

The vagrant file is attached. I have listed a short description of what to do on linux and mac:

Linux:

  1. append --bip="172.17.42.1/24 to your docker/default or your /lib/systemd/system/docker.service
    @see https://hub.docker.com/r/jderusse/dns-gen/ "Start the container automatically after reboot"
  2. Start the docker daemon.
    docker run --daemon --name dns-gen
    --restart always
    --publish 172.17.42.1:53:53/udp
    --volume /var/run/docker.sock:/var/run/docker.sock
    jderusse/dns-gen
  3. Add 172.17.42.1 to your dns configuration

Mac:
Replace the vagrant file in your projects folder
Add a route
sudo route -n add 172.17.0.0/16 172.16.0.11
Set the boot2docker ip as your dns
After dsh up clean your dns cache
sudo killall -HUP mDNSResponder

If you are interested, let me know. I can make a pull request and try integrate that into dsh.
vagrant.txt

@lmakarov
Copy link
Owner

@christianwiedemann, If I understand you correctly, you are proposing to add routing for the docker internal network, so containers can be addressed directly by their internal IPs?

The other part (DNS discovery) is already in place in https://github.com/blinkreaction/boot2docker-vagrant (and on Linux/Ubuntu it's done by dsh).
See https://github.com/blinkreaction/boot2docker-vagrant/blob/develop/docs/networking.md#dns-resolution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants