Docker Community Forums

Share and learn in the Docker community.

The command 'cmd /S /C Invoke-WebRequest "https://dist.nuget.org/win-x86-commandline/v$env:NUGET_VERSION/nuget.exe"

The below error occurred when I run the “Docker compose”. Can someone please advise on this?.

Step 6/10 : RUN Invoke-WebRequest “https://dist.nuget.org/win-x86-commandline/v$env:NUGET_VERSION/nuget.exe” -UseBasicParsing -OutFile “$env:ProgramFiles\NuGet\nuget.exe”
—> Running in 295537060f5c
‘Invoke-WebRequest’ is not recognized as an internal or external command,
operable program or batch file.
The command ‘cmd /S /C Invoke-WebRequest “https://dist.nuget.org/win-x86-commandline/v$env:NUGET_VERSION/nuget.exe” -UseBasicParsing -OutFile “$env:ProgramFiles\NuGet\nuget.exe”’ returned a non-zero code: 1
ERROR: Service ‘dotnetsdk’ failed to build : Build failed

My PC Details
.NET Framework version = 4.8.4084.0
Powershell version = 7.1.3
Windows 10 = Pro
System Type =64-bit x64-based processor
Net.SecurityProtocolType =
SystemDefault
Ssl3
Tls
Tls11
Tls12
Tls13