Wednesday, October 23, 2019

Sitecore Docker Setup; "curl: (6) Could not resolve host"


Given the general Docker hype and the clear signals that as an industry containerization adoption will continue becoming more widespread, I decided to take Docker for another spin after several years ignoring it completely and begin fiddling with Sitecore Docker Images.

Sticking closely to the quick start guide on the community-driven Sitecore Docker Images repository - I ran into one snag:


curl: (6) Could not resolve host: dist.nuget.org
curl: (6) Could not resolve host: download.microsoft.com
curl: (6) Could not resolve host: aka.ms
curl: (6) Could not resolve host: www.7-zip.org

The \docker-images\windows\9.0.2\sitecore-assets\Dockerfile itself only confirmed that a simple curl command initializes the download process from several hard-coded sources:

After some Googling, I found a post - Fix Docker's networking DNS config -by @nottrobin which outlined a similar error.

The key takeaway: this happens "usually because DNS lookups are failing in Docker images".

Their recommendation is to "change the DNS settings of the Docker daemon" by adding a new configuration file to /etc/docker/daemon.json - which I couldn't find.  Given that I'm using a Windows 10 machine and @nottrobin was using Linux, my guess is that there are path differences here. 

I ended up modifying the following file:
C:\ProgramData\Docker\config\daemon.json

And adding a new "dns" parameter (pointing to Google's public 8.8.8.8 DNS)

After saving and restarting Docker, the 'Could not resolve host' error no longer killed the build process. 戊



15 comments:

  1. Replies
    1. Great Article Cloud Computing Projects

      Networking Projects

      Final Year Projects for CSE

      JavaScript Training in Chennai

      JavaScript Training in Chennai

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  2. I had a similar error message when trying to attach the VS debugger to the docker image. I was connected to an unrelated vpn, and when I disconnected from the vpn and restarted the docker image, the dns worked on the docker image.

    ReplyDelete
  3. Hi, I tried changing the DNS and restarted Docker, but I still run into the same issue. Any help would be appreciated.

    ReplyDelete
  4. It's works for me!

    Funcionou aqui no Brasil =D

    ReplyDelete
  5. toptan i癟 giyim tercih etmenizin sebebi kaliteyi ucuza sat覺n alabilmektir. r羹nler yine orjinaldir ve size sorun yaatmaz. Yine de bilinen tekstil markalar覺n覺 tercih etmelisiniz.

    Digit羹rk bavuru g羹ncel adresine hogeldiniz. Hemen bavuru yaparsan覺z an覺nda kurulum yapmaktay覺z.

    tutku i癟 giyim T羹rkiye'nin 繹nde gelen i癟 giyim markalar覺ndan birisi olmas覺n覺n yan覺 s覺ra en 癟ok satan markalardan birisidir. r羹nleri hem 癟ok kalitelidir hem de pamuk kullan覺m覺 daha fazlad覺r.

    nbb s羹tyen hem kaliteli hem de uygun fiyatl覺 s羹tyenler 羹retmektedir. S羹tyene ek olarak s羹tyen tak覺m覺 ve jartiyer gibi 羹r羹nleri de mevcuttur. zellikle Avrupa ve Orta Dou'da 癟ok癟a tercih edilmektedir.

    yeni inci s羹tyen kaliteyi ucuz olarak sizlere ulat覺rmaktad覺r. ok 癟eitli s羹tyen varyantlar覺 mevcuttur. i癟 giyime damga vuran markalardan biridir ve genellikle Avrupa'da ismi s覺kl覺kla duyulur.

    i癟 giyim 羹r羹nlerine her zaman dikkat etmemiz gerekmektedir. retimde kullan覺lan malzemelerin kullan覺m oranlar覺, kuma覺n esneklii, 癟ekmezlik testi gibi bir癟ok unsuru ayn覺 anda deerlendirerek se癟im yapmal覺y覺z.

    i癟 giyim bayanlar覺n erkeklere g繹re daha dikkatli olduklar覺 bir aland覺r. Erkeklere g繹re daha 繹zenli ve daha se癟ici davran覺rlar. Biliyorlar ki i癟 giyimde kulland覺klar覺 eyler kafalar覺ndaki ve ruhlar覺ndaki 繹zellikleri d覺a vururlar.

    ReplyDelete
  6. You can make video about it and publish such video on youtube. From here https://soclikes.com you can buy many likes and views for your video

    ReplyDelete