Proxy settings for vs_buildtools.exe inside a Docker container?

  • Thread starter Thread starter Spacefolder
  • Start date Start date
S

Spacefolder

Guest
Folks,

Bottom line up front -- how do I tell vs_buildtools.exe inside a Docker container to use a proxy?

I'm following the instructions on docs.microsoft.com for installing VS Build Tools into a container. The installer errors out with exit code 5003. I made two minor changes to the Dockerfile. First, I'm using an earlier base image (-1803 instead of -ltsc2019) because my organization hasn't yet deployed a more recent Windows build. Second, I requested Microsoft.VisualStudio.Workload.VCTools (no --includeRecommended) instead of '--all except for a bunch of SDKs' to cut down on size.


I'm pretty sure this is a proxy issue. I'm able to download files from HTTPS URIs without incident if I use Invoke-WebRequest directly from Powershell as long as I supply proxy information. Also, the firewall logs for the host showed the Docker container trying to connect directly to aka.ms.

Here is what I believe is the most relevant snippet from the installer logs.


VisualStudio Bootstrapper:1/10/2020 1:11:17 PM: Attempting download 'https://aka.ms/vs/16/release/installer' using engine 'WebClient'
VisualStudio Bootstrapper:1/10/2020 1:11:38 PM: WebClient error 'ConnectFailure' - proxy setting 'Default' - 'https://aka.ms/vs/16/release/installer'.
VisualStudio Bootstrapper:1/10/2020 1:11:59 PM: WebClient error 'ConnectFailure' - proxy setting 'DefaultCredentialsOrNoAutoProxy' - 'https://aka.ms/vs/16/release/installer'.
VisualStudio Bootstrapper:1/10/2020 1:12:20 PM: WebClient error 'ConnectFailure' - proxy setting 'NetworkCredentials' - 'https://aka.ms/vs/16/release/installer'.
VisualStudio Bootstrapper:1/10/2020 1:12:41 PM: WebClient error 'ConnectFailure' - proxy setting 'DirectAccess' - 'https://aka.ms/vs/16/release/installer'.
VisualStudio Bootstrapper:1/10/2020 1:12:41 PM: WebClient failed in 'https://aka.ms/vs/16/release/installer' with 'Unable to connect to the remote server' - 'https://aka.ms/vs/16/release/installer'.




How do I configure proxy settings for vs_buildtools.exe here?

Continue reading...
 
Back
Top