2

I'm having trouble with name resolution on Azure using custom Docker container with Web App on Linux.

Name resolution with curl and wget takes 4-10 seconds when using default resolv.conf file in Azure.

search reddog.microsoft.com
nameserver 127.0.0.11
options timeout:1 attempts:5 ndots:0

When i change nameserver to 8.8.8.8, all works fine.

If i understand correctly, Docker mounts the host machine's resolv.conf file and DNS settings should be set with Docker run command options. It's not recommended to change these files directly.

The exact details of how Docker manages the DNS configurations inside the container can change from one Docker version to the next. So you should not assume the way the files such as /etc/hosts, /etc/resolv.conf are managed inside the containers and leave the files alone and use the following Docker options instead.

However, it doesn't seem possible to set docker run parameters in Azure.

This is my previous post on this subject on SO.

0 Answers0