Debugging an ASP.NET Core docker web application in in Visual Studio ASP.NET Core 2.1 using HTTPS

I found i kept having this exception raised when trying to debug a ASP Net Core 2.2. web application in docker using Visual Studio.

I kept getting this error, which prevented the website starting up:

Microsoft.AspNetCore.Server.Kestrel[0] Unable to start Kestrel. System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found.

There are multiple references about how this can be resolved (search Google). For example, here is one

However, I found this worked for me:

Debugging an ASP.NET Core docker web application using Visual Studio.

The only caveat is that VS mapped my secrets to /root/.aspnet/https rather than /root/.dotnet/https as specified