Open xsoheilalizadeh opened 3 years ago
imed out because no data was received for 60000ms. Exception of type 'System.TimeoutException' was thrown. Same issue in normal dot net build command on linux.
Our organisation also faced this issue on a windows host with windows container.
After experimenting with many dotnet restore options we discovered that a curl on the actual package url showed a data rate of about 2-5 kb/s 🐌. Some curls later we knew the network issue applied to URLs regardless the target network (intranet/www).
Probably out of pure luck I discovered https://github.com/microsoft/Windows-Containers/issues/145 .
Someone suggested to execute Get-NetAdapterRSC | Disable-NetAdapterRSC
on the container host.
I gave it a try and didnt even restart the host - just the container.
curl was fast 🚀(5 mbit/s) and so was dotnet restore 🥳
TLDR:
curl
a big file inside your container to get a better insightGet-NetAdapterRSC | Disable-NetAdapterRSC
on your host if you are brave enoughGive 👍 or 👎 on this post if this workaround resolved your issue.
Anyone who know How to fix this on Linux Machine. I am facing the same problem
Don't understand what this does, but I can confirm that it now makes my docker-hosted dotnet restore
100 times faster...!
where do you put this, before or after the build command? @skotl
where do you put this, before or after the build command? @skotl
@h3ndry It's not in the build pipeline, but addressed an issue on my PC where docker was pulling files incredibly slowly. To try this on your PC (and I have genuinely no clue what it does, how safe or dangerous it is, so caveot empor!):
Get-NetAdapterRSC | Disable-NetAdapterRSC
That's it! The results were instant for me when I reran the docker build on my PC but you may have to reboot your PC ¯_(ツ)_/¯
where do you put this, before or after the build command? @skotl
Its a one-time-thing. Do it after/before docker installation
Forwarded form https://github.com/dotnet/dotnet-docker/issues/1670
I had a problem when building a sample dotnet app When I run
dotnet restore
in docker image I get following errors:Dockerfile
File *.csproj
Output of docker version
Output of docker info
\cc @JonDouglas