Replies: 3 comments 2 replies
-
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Beta Was this translation helpful? Give feedback.
-
Are you able to provide a portion of these logs, sanitized if necessary? |
Beta Was this translation helpful? Give feedback.
-
Is this specific to NuGet? Are you able to make a simple ping or other web request from the Windows container? |
Beta Was this translation helpful? Give feedback.
-
Describe the Bug
When using the Windows-based docker image for dotnet sdk, dotnet restore takes a huge amount of time or simply fails and can't overcome the corporate proxy. We set the proxy configuration as
http_proxy
,HTTP_PROXY
,https_proxy
,HTTPS_PROXY
,no_proxy
,NO_PROXY
) andThis happens on a Win 10 Professional (20H2) VM used as build-server with Gitlab CI and local Win 10 Professional (20H2) developer machines. Running
dotnet restore
outside a container works as expected.The linux docker image works with the same setup. There the environment variables will also be injected by the Gitlab Runner and used in the linux dotnet sdk image for restoring the dependencies of projects.
Steps to Reproduce
Setup an environment with a Win 10 Professional (20H2), a proxy and run the mcr.microsoft.com/dotnet/sdk:6.0 docker image with a small project like the default ASP.NET api template. Use one of the above mentioned ways to inject the proxy settings into the dotnet sdk within the docker image and run a dotnet restore with the project copied to the docker image.
Expected Behaviour
A dotnet restore within the docker image uses the
nuget.config
with set proxy settings or environment variables and thus works through a corporate proxy as it does on the host system.Actual Behaviour
A
dotnet restore
fails with "error : Unable to load the service index for source https://api.nuget.org/v3/index.json." on a local machine or takes a huge amount of time in the VM.The following picture is from our build server:
The same build takes around 1 minute on the VM without docker or on a different Linux-based system with the docker image compared to the Windows-based docker job, which takes 20 minutes.
Our administrator looked at the logs and saw that the VM tries to bypass the proxy until it finally settles with it.
Other Information
Output of
docker version
Output of
docker info
Beta Was this translation helpful? Give feedback.
All reactions