I'm using Hyper-V to create a VM running Ubuntu 18.04. I'm having some issues with docker not resolving DNS requests properly. This guide suggests using nmcli to identify the DNS server.
$ nmcli dev show | grep 'IP4.DNS'
IP4.DNS[1]: 10.0.0.2
First of all, is nmcli installed by default? I don't think so, but even after installing it running this command doesn't show anything for IP4.DNS -- nor even DNS. Is there a better way of discovering what DNS server my installation is using?
systemd-resolve --status | grep 'DNS Servers'
and see what it says your DNS servers are. If there is no output, then your system is not configured to use DNS at all and you will have to set that up. For now, let's just test to see if there's any DNS servers configured. – Thomas Ward Jul 31 '18 at 14:48