aj-may / dotdocker

🐳 A utility to help setup a docker development environment with host based routing
MIT License
40 stars 10 forks source link

feat: changed port 53 -> 822 #27

Closed jtlacci closed 4 years ago

jtlacci commented 5 years ago

@aj-may please add @rmjames to this repo

aj-may commented 5 years ago

This change needs to be only for users using MacOS. Linux distros don’t allow for dns servers running on non standard ports. Additionally we need to change the resolver config file that is written to contain the port. @jtlacci please share my notes. I sent you a lot of info on this.

jtlacci commented 5 years ago

@codfish great input

jtlacci commented 5 years ago

AJ's comments:

https://github.com/aj-may/dotdocker/blob/master/src/containers/dnsmasqConfig.js

src/containers/dnsmasqConfig.js

export default { Image: 'andyshinn/dnsmasq:latest', name: 'dotdocker-dnsmasq', Cmd: ['--address=/docker/127.0.0.1', '--log-facility=-'], ExposedPorts: {

this will need to be updated to be a function that returns the josn object so that we can pass in the desired port number and then you will need to refactor the command to use different ports based on distro 53 on linux random high port on macos and then update the resolver config file that gets written on macOS to specify port number ie.

cat /etc/resolver/docker Generated by dotdocker nameserver 127.0.0.1 port ${randomNumber}

https://github.com/aj-may/dotdocker/tree/master/src/tasks/setupDNS

this is an example of how i did that kind of distro spicific stuff for the config file might make sense to do something similer but also might be overkill

aj-may commented 5 years ago

@jtlacci @rmjames any updates on this? Let me know if you have any questions on my notes.