Set up HTTPS on local with .NET Core and Docker
5 min readMar 26, 2020
When running a .NET Core on a Docker container, the protocol used by default is HTTP.
In this article, I will layout a step to step process to turn an HTTP solution running on containers into HTTPS.
Create a secrets.json
I covered the steps required to instantiate a “secrets.json” in this article:
Store a .pfx password
The secret that we want to store is the password that ASP.NET will need in order to access it.
dotnet user-secrets set "Kestrel:Certificates:Development:Password" "yourpassword"
Create and trust a .pfx certificate
.NET Core has a nice command-line tool that can be used to generate dev time self-signed certificates.