1

I am trying to set up Sitecore 10.2 xp0 in docker but I am getting error when I run the command docker-compose up -d Below is the error I get-

Please let me know how can this be fixed.

Step 7/11 : 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 4a20f6fbca6c
Invoke-WebRequest : The underlying connection was closed: Could not establish
trust relationship for the SSL/TLS secure channel.
At line:1 char:76
+ ... yContinue'; Invoke-WebRequest https://dist.nuget.org/win-x86-commandl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:Htt
   pWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
   ll.Commands.InvokeWebRequestCommand

enter image description here

1 Answer 1

3

Try this.

  • Downloaded nuget.exe, manually using this https://dist.nuget.org/win-x86-commandline/v5.6.0/nuget.exe

  • Create an empty folder as Nuget under C:\Program Files. ex. -- C:\Program Files\Nuget

  • Copy the nuget.exe to C:\Program Files\Nuget\

  • Comment this line in Dockerfile, available in ROOT_PROJECT\docker\build\dotnetsdk\Dockerfile

    ## RUN `Invoke-WebRequest "https://dist.nuget.org/win-x86-commandline/v5.6.0/nuget.exe" -UseBasicParsing -OutFile "$env:ProgramFiles\NuGet\nuget.exe"`
    
  • Afterwards run .\up.ps1 again

Hope this will solve your issue.

Thanks

1
  • 1
    Thanks for your answer. Though I still have some issue but your solution solved that specific problem so I marked it as answer. Commented May 31, 2022 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.