# Windows Docker SSL trust problem | certificate valid

**URL:** <https://forums.docker.com/t/windows-docker-ssl-trust-problem-certificate-valid/103736>\
**Category:** Docker Desktop\
**Tags:** docker, build\
**Created:** [January 29, 2021, 11:35am UTC](https://forums.docker.com/t/windows-docker-ssl-trust-problem-certificate-valid/103736 "2021-01-29T11:35:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucassd](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@lucassd](https://forums.docker.com/u/lucassd)\
**Post date:** [January 29, 2021, 11:35am UTC](https://forums.docker.com/t/windows-docker-ssl-trust-problem-certificate-valid/103736/1 "2021-01-29T11:35:02Z")

</div>

Hello guys,

I’m trying to build an windows conatiner based on the aspnet image from microsoft:

> **[microsoft/containerregistry](https://github.com/microsoft/containerregistry)**
>
> Microsoft Container Registry description and related FAQ

`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

---

<div class="post-metadata">

**Author:** ![bazhikov](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/bazhikov/32/33498_2.png) [@bazhikov](https://forums.docker.com/u/bazhikov)\
**Post date:** [June 29, 2022, 5:03pm UTC](https://forums.docker.com/t/windows-docker-ssl-trust-problem-certificate-valid/103736/2 "2022-06-29T17:03:41Z")

</div>

have you resolved this? if yes, how?

---

<div class="post-metadata">

**Author:** ![wrhadie](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/wrhadie/32/47907_2.png) [@wrhadie](https://forums.docker.com/u/wrhadie)\
**Post date:** [May 19, 2024, 12:46pm UTC](https://forums.docker.com/t/windows-docker-ssl-trust-problem-certificate-valid/103736/3 "2024-05-19T12:46:32Z")

</div>

are you already solve this?
