Run ASP.NET Core 3.1 Apps in Docker with HTTPS.



In this step by step tutorial I take you through how to package your ASP.NET Core app as a Docker Image and then run your image as a Docker container with HTTPS Enabled. This includes creating a dedicated self-signed development certificate, configuring user secrets and passing in the necessary environment variables to the container to enable HTTPS.
We further configure this with Docker Compose for ease of use and reuse going forward.

Level: Beginner / Intermediate

📕 My Book: https://www.apress.com/gp/book/9781484262542
😍 Patreon Site (Exclusive Member Benefits!): https://www.patreon.com/binarythistle
💻 Code on GitHub: https://github.com/binarythistle/S03E05—Docker-HTTPS-and-ASPNET-Core
🔗 Install Docker Desktop Via WSL: https://docs.docker.com/docker-for-windows/install-windows-home/
🔗 Docker Net Core Set Up: https://docs.docker.com/engine/examples/dotnetcore/
🔗 HTTPS & Docker Microsoft Doc: https://github.com/dotnet/dotnet-docker/blob/master/samples/run-aspnetcore-https-development.md

⏲️-Time Codes-⏲️

1:33 – Course Outline
3:13 – Demo
6:13 – Overview of Docker
10:23 – Scaffold Up API
18:40 – Build Docker Image
24:48 – Run Our Inage (without HTTPS)
27:39 – Some Container housekeeping
31:32 – Generate Dev Certifcate for Container
35:15 – Configuring User Secrets
42:12 – Rebuild our image (with User Secrets)
43:32 – Overview of Docker Run parameters
48:26 – Run our Container with HTTPS (Docker CLI)
49:40 – Migrate and Run in Docker Compose
56:40 – Certificate file name case sensitivity
58:20 – Final Thoughts
58:52 – Patreon Supporter Credits

Comments are closed.