Skip to content

Use ADD to download Windows dockerfile dependencies

Arran Walker requested to merge ajwalker/fix-docker-windows-downloads into main

What does this MR do?

Uses the Dockerfile ADD command to download and add needed dependencies.

Why was this MR needed?

Using Invoke-Webrequest to GitHub inside the build container would result in a DNS error where "github.com" could not be resolved.

We suspected this might be due to our infrastructure having a mismatching MTU configured. But correcting this didn't improve matters.

Reaching out to GCP they said the following:

Thank you for contacting Google Cloud Support. I can understand that you are getting the intermittent DNS failures error [1] with Windows VMs on Docker. Please correct me and let me know if I misunderstood or missed anything.
 
Thanks for providing the detailed information regarding the issue,
 
Please note that Internal OS issues on docker containers are out of scope of GCP support. I will try to help you the best I can, but this is outside my scope of expertise and the assistance I can offer is limited and support will be provided on a best effort basis. 
 
However, Based on my investigation on public Internet docs [2-8], It seems to be a known issue for windows on docker containers.

So for the next step to resolve the issue, kindly follow the provided solutions on these docs. 

I hope you find this information helpful. If you have any other questions/Concerns or if you need further assistance, please do not hesitate to contact me and I will be happy to help.

Thanks and Regards,

Kamran
Google Cloud Support, Montreal
Working Hours: 09:00 AM - 05:00 PM EST.

[1]: Invoke-Webrequest : The remote name could not be resolved: 'github.com'
At line:1 char:255
+ ... pe]::Tls12; Invoke-Webrequest https://github.com/git-for-windows/git/ ...
[2]: https://stackoverflow.com/questions/57073089/docker-build-failed-for-invokewebrequest
[3]: https://stackoverflow.com/questions/71213490/invoke-webrequest-the-remote-name-could-not-be-resolved-http
[4]: https://github.com/docker/for-win/issues?q=%22The+remote+name+could+not+be+resolved%22
[5]: https://github.com/jadesoftwarenz/JADE-container-examples/issues/1
[6]: https://github.com/docker/for-win/issues/427
[7]: https://github.com/docker/for-win/issues/6453
[8]: https://forums.docker.com/t/docker-dns-not-responding-from-inside-a-container/103982

So we don't know how to fix this but ADD works for now.

What's the best way to test this MR?

Pipeline

What are the relevant issue numbers?

Edited by Arran Walker

Merge request reports