DNS resolution unavailable - unless local.list is deleted

I don't have an explanation for that hostname being set if you're trying to override it with the dns argument.

In my testing the priority for DNS resolv.conf servers is as follows, from high to low:

  1. Use whatever --dns arugment says (or dns: list in docker-compose v3)
  2. Use what /etc/docker/daemon.json says for DNS: key list
  3. Inherit the Docker host's DNS settings