Using a Windows executor, we are building a Windows container using docker in CircleCI.
Recently, builds have begun failing and we have traced the issue down to the inability of the docker build process to pull dependencies from the internet. For example, when trying to install Python in the image:
Downloading https://www.python.org/ftp/python/3.9.7/python-3.9.7-amd64.exe ...
Invoke-WebRequest : The remote name could not be resolved: 'www.python.org'
At line:1 char:316
+ ... pe]::Tls12; Invoke-WebRequest -Uri $url -OutFile 'python.exe'; Write- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:Htt
pWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
ll.Commands.InvokeWebRequestCommand
This is new behavior, pipelines that successfully executed last week fail in this manner.
I suspect the networking connectivity to the docker build engine has been affected by some recent change in the CircleCI environment.
I have tried the –network=nat tag, to no avail. The only other option is to download all the packages outside of the docker build script, which is our last resort.