Hello guys,
I’m trying to build an windows conatiner based on the aspnet image from microsoft:
mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
I recently updated my docker desktop to version 3.1.0(51484)
Engine version: 20.10.2
I try to install chocolatey on the container to have a package manager. Before I updated docker desktop the image built just fine, but now it throws me the error, that it cant trust the connection to the official chocolatey site. The command:
RUN @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" \
&& SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" \
The error:
Exception calling "DownloadString" with "1" argument(s): "The underlying
connection was closed: Could not establish trust relationship for the SSL/TLS
secure channel."
At line:1 char:1
+ iex ((New-Object System.Net.WebClient).DownloadString('https://chocol ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
The certificate of the site is valid, so i don’t know why this error is coming up.
I would appreciate your help.
Greets Luca