Could not resolve host: nodejs.org

While building the docker images for Sitecore JSS with Next.js you may encounter an error like Could not resolve host: nodejs.org or any other domain so this means public host is not reachable and for resolving this try configuring the docker daemon to use a default dns server by configuring daemon.json in windows.


The default google dns servers is 8.8.8.8 so you can configure this in the C:\ProgramData\Docker\config\daemon.json as following and restart the docker desktop.


{

    "dns": 

    [

        "8.8.8.8"

    ]

}

But if you will directly edit the daemon.json then this entry will be removed on docker desktop restart. So better you configure this from docker desktop application under Preferences -> Daemon ->Advanced or alternatively do in the following:


Restart the docker desktop and try again.






1 comment:

  1. https://sitecorepeanuts.blogspot.com/2024/02/could-not-resolve-host-nodejsorg.html

    ReplyDelete

Troubleshoot personalization on xm cloud

Here are the troubleshooting steps below that helped personalization to work. We checked the events analytics in the page builder but it was...