jpillora / docker-dnsmasq

dnsmasq in a docker container, configurable via a simple web UI
MIT License
734 stars 226 forks source link

switch from no-daemon to keep-in-foreground #11

Open captn3m0 opened 5 years ago

captn3m0 commented 5 years ago

From dnsmasq docs:

-d, --no-daemon

Debug mode: don't fork to the background, don't write a pid file, don't change user id, generate a complete cache dump on receipt on SIGUSR1, log to stderr as well as syslog, don't fork new processes to handle TCP queries. Note that this option is for use in debugging only, to stop dnsmasq daemonising in production, use --keep-in-foreground.

I haven't worked that much with dnsmasq, so if --no-daemon is more correct for Docker usage, it would be nice to know why.

jpillora commented 5 years ago

http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

-k, --keep-in-foreground Do not go into the background at startup but otherwise run as normal. This is intended for use when dnsmasq is run under daemontools or launchd.

You are correct, we should be using --keep-in-foreground