stellirin / docker-postgres-windows

MIT License
22 stars 24 forks source link

Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel. #3

Closed ashoknallasivam closed 4 years ago

ashoknallasivam commented 4 years ago

Need to add below line in the dockerfile

Download EnterpriseDB and remove cruft

RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ $URL1 = $('{0}/postgresql-{1}-windows-x64-binaries.zip' -f $env:EDB_REPO,$env:EDB_VER) ; \ Invoke-WebRequest -Uri $URL1 -OutFile 'C:\EnterpriseDB.zip' ; \ Expand-Archive 'C:\EnterpriseDB.zip' -DestinationPath 'C:\' ; \ Remove-Item -Path 'C:\EnterpriseDB.zip' ; \ Remove-Item -Recurse -Force –Path 'C:\pgsql\doc' ; \ Remove-Item -Recurse -Force –Path 'C:\pgsql\include' ; \ Remove-Item -Recurse -Force –Path 'C:\pgsql\pgAdmin*' ; \ Remove-Item -Recurse -Force –Path 'C:\pgsql\StackBuilder'

stellirin commented 4 years ago

Your Windows version is probably out of date. I don't know in which version of Windows this changed, but TLS 1.2 is enabled by default on the Windows Insiders builds which I currently use:

PS C:\Users\stellirin> [Net.ServicePointManager]::SecurityProtocol
Tls, Tls11, Tls12

Windows version:

PS C:\Users\stellirin> [System.Environment]::OSVersion.Version
Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      19018  0 
ashoknallasivam commented 4 years ago

@stellirin Ah ! yes its Windows 2016 server (1607).

Major Minor Build Revision


10 0 14393 0

Thanks for the update