Setting dns-search should propagate into containers

Hi all,

We have run into issues where our app needs to resolve hostnames without FQDNs. Normally we’d just set dns-search in the NetworkManager settings, which get correctly proporgated to /etc/resolv.dnsmasq, but given Balena runs DNSMasq as its primary nameserver, these aren’t propagated into /etc/resolv.conf on the host. Further to that, when running a container in network_mode: host, the DNS server that is set is to that of an internal address running on the host (i.e nameserver, also without search domains set.

Given this is dynamic between devices in our fleet, setting it in docker-compose.yml doesn’t work. How can we go about rectifying this? Docker on Linux respects this setting correctly.