Photo by Kyle Glenn on Unsplash
What to do when you have github.com or chocolatey.org cannot be resolved when you try to do docker build.
Multiple possible course of action:
- use --add-host argument in the build to give resolution 
- use --network "Default Switch" argument, to specify to RUN commands which network to use 
- add in dockerfile, for example: 
 
RUN echo 104.20.73.28 chocolatey.org >> "C:\Windows\System32\drivers\etc\hosts"
- set DNS for IPv6
Hope this helps !
 
 
              
 
    
Top comments (0)