Nginx, resolver directive: how-to?

Even if it is chicken and egg I want to try to use domain name for resolver. I hope Nginx will use resolve.conf first and then only resolve backend ip. But I cannot find if I can assign a host name to lxd host. Is it possible? So I can talk to a parent host from a container using hostname not an ip.