Intall app in windowsservercore container returns error "The request was aborted: Could ot create SSL/TLS secure channel."

Issue type: online installation failure

Host System: Windows 10 Enterprise LTSC Version: 1809

Docker for windows version: 1806.1-ce, build e68fc7a

.net Framework version in windows servercore: 4.7.3163.0

Steps to reproduce

  1. Run following command to run a windowsservercore with chocolatey installed.

docker run -it stefanscherer/chocolatey powershell

  1. Run following command in powershell to install JDK8

choco install jdk8 -y

Error message returned:

Chocolatey v0.10.11
Installing the following packages:
jdk8
By installing you accept licenses for the packages.
[NuGet] An error occurred while loading packages from ‘https://chocolatey.org/api/v2/’: The request was aborted: Could
ot create SSL/TLS secure channel.
jdk8 not installed. The package was not found with the source(s) listed. n Source(s): strong text
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn’t specify --pre,
the package may not be found.

Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • jdk8 - jdk8 not installed. The package was not found with the source(s) listed.
    Source(s):
    NOTE: When you specify explicit sources, it overrides default sources.
    If the package version is a prerelease and you didn’t specify --pre,
    the package may not be found.