Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send

Hi,

I am setting up build environment using docker as per the instructions given in MS doc (https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops-2019).

When running the container it is throwing the error
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

Added below line in start.ps1

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $True }
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12

Then observing below error
Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send.

My environment details are as
Client: Docker Engine - Community
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:43:18 2020
OS/Arch: windows/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.12
API version: 1.40 (minimum version 1.24)
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:57:30 2020
OS/Arch: windows/amd64
Experimental: false

Please help me to resolve the issue, Thanks in advance.

Thanks & Regards,
Radhakrishna