Braindump

A place to keep my thoughts

DNSMasq for Using Docker Service Containers in and Out of Docker

In order to be able to use services installed via docker-compose from both in- and outside of the docker network I have started using DNSMasq. This lets me resolve hosts and services in the .dev domain from both inside and outside of the docker network. I have created a systemd service definition, that starts DNSMasq after the network comes up. It ties into openresolv, so that the configuration survives dynamic network changes (like vpn). here are the config files:

/etc/systemd/system/dnsmasq-tld-dev.service

/etc/resolvconf.conf

/etc/dnsmasq-tld-dev.conf