docker-dnsmasq is a tool for adding docker containers to dnsmasq config in realtime.
- golang
- brew
- dnsmasq (installed with brew)
- docker-toolbox (not docker for mac)
- golang
- systemctl
- dnsmasq
- docker
go get github.com/defektive/docker-dnsmasq
sudo docker-dnsmasq -c=/usr/local/etc/dnsmasq.d/docker.conf \
-r="brew services restart dnsmasq" \
-d=tcp://192.168.99.100:2376 \
-t=$DOCKER_CERT_PATH daemon
sudo docker-dnsmasq daemon
is equal to
sudo docker-dnsmasq -c=/etc/dnsmasq.d/docker.conf -r="systemctl restart dnsmasq" daemon