I have a Windows 10 laptop running SQL Server and Docker for Windows. I have a linux container running a .NET Core app trying to connect to SQL Server on the laptop. I’ve found that on my work network, I can connect using my machine name. When travelling, I can’t use my machine name and must use the local IP address assigned to me by the network I’m on. It seems that Docker uses 184.108.40.206 for DNS name resolution in these cases. Is there some way to access my laptop by name from within my containers? Why does Docker seem to need a DNS server to resolve the name of the computer it’s running on?
Any help would be appreciated. It’s tiring changing my connection string every day to reflect the IP address of the network I connect to in each city I visit.
Thanks in advance,