Docker failed to make image of .net core

#Docker was really a revolution to developers who have to spend much time to configure servers every time and take care of dependency updates and so on before docker was burn But world see a pretty little girl to change all a developer’s world by taking care of all messy tasks .

In the other hand there is naughty boy sited at the corner who is name is #.Net #core , A fast runner and open minded boy with the goal of make .net developer world more sweet and flexible .

So there is high intention to get this boy and girl together to save the many hours and sleep sooner at the night (at least before 2 am 🙂 ) , you start to develop your code and write and write by .net core and the more you work the more you enjoy and yes it’s time to publish your job then you start to write a nice and sexy #dockerfile But when you tell docker please make my image An ugly error occurred :

dotnet restore Unable to load the service index for source


 nuget cannt download package X from ‘

so what’s going on ? ??? I spent couple of days to finding out why something like that could be happen even your code published successfully and after all BOOOM ,I founded out.

Story is begin from #nuget wants to download packages in parallel but while docker building image nuget failed to download packages Simultaneously while publishing by the command “Dotnet publish -c release -o X”

Solution is just to tell nuget “Please dont do it ” by the put

“RUN dotnet restore –disable-parallel “

Just before

Run dotnet publish …..

In your dockerFile

Leave a Comment