I am trying to connect to an sql server from my windows container. It all works fine when I spin up the container locally on my machine, or on an azure vm, and I can connect to the azure sql server but the connection fails when I deploy the container to azure container instance. The sql server firewall is open 0.0.0.0 to 255.255.255.255.
I believe that I have narrowed it down to a DNS issue because when I try to lookup the sql server or any host for that matter I get a "No such host is known". There is a known 30 second startup delay but it still does not resolve after multiple retries.
IPHostEntry ipHostInfo = Dns.GetHostEntry("mysqlserver.database.windows.net");
IPAddress ipAddress = ipHostInfo.AddressList[0];
Console.WriteLine($"Ipaddress {ipAddress.MapToIPv4()}");