DEV Community

ToolGBRMaker
ToolGBRMaker

Posted on • Originally published at toolgbrmaker.wordpress.com on

Quick Tip: DNS lookup issue – Docker Container | Business Central

Recently, due to some Integration REST API tests, I faced an error during my request HTTP attempt. The error was:

An error occurred while sending the request. The remote name could not be resolved:

After a search on some blogs I was able to correlate the error with a DNS issue and gave it a try the following commands on Container Command Prompt:

ping google.com
Enter fullscreen mode Exit fullscreen mode

With the result of…


Ping request could not find host google.com. Please check the name and try again.

ping 8.8.8.8
Enter fullscreen mode Exit fullscreen mode

With the result of…


Success

After been identified the issue I was able to fix it by adding the following lines on Docker Settings – Daemon configuration file:

{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": true,
  "experimental": true,
  "dns": [
    "8.8.8.8"
  ]
}
Enter fullscreen mode Exit fullscreen mode

The above solution was taken from the following blog post. Thank you Robert Bird for sharing it!

Stay safe!

Top comments (0)