I migrated from ubuntu to photon os for my docker host and ran into this issue again. Here are the steps I took on photon (I think they are the same on ubuntu, so you can probably ignore my original post). I'm not sure if this is the right way to do this, but this is what worked for me:
systemctl stop systemd-resolved
systemctl disable systemd-resolved
nano /etc/resolv.conf
- manually add your nameserver IPs
If you stop systemd-resolved without manually setting your nameserver IPs, you won't be able to connect to hostnames via the host.