Developing a Dockerized Asp.Net Core Application Using Visual Studio Code

Wael Kdouh
7 min readMay 16, 2019

I recently embarked on a mission with my colleague Kendall Roden to uncover the feature parity between Visual Studio 2017/2019 and Visual Studio Code when it comes to developing a dockerized Asp.Net Core application. We started by identifying the artifacts that get scaffolded by Visual Studio 2017/2019 which would need to be manually generated with Visual Studio Code. Here is the list that we came up with:

  • Generating the Dockerfile
  • Utilizing a Certificate from inside the docker container
  • Add ability to debug the application running inside the Docker container

We started by ensuring that the latest dotnet sdk is installed. Here is the latest version at the time of writing this post:

We won’t go into the details of generating a new ASP.Net Core application using the dotnet cli as this has been heavily documented elsewhere. Instead we will jump directly into addressing the first point on our list which is adding the Dockerfile to the project. This can either be added manually or you can use the docker extension for Visual Studio Code which can be found here. At the time of writing this post the docker extension generated a Dockerfile that utilized the microsoft/aspnetcore image instead of the newly introduced images which…

--

--

Wael Kdouh
Wael Kdouh

Written by Wael Kdouh

Principal Cloud Solution Architect at Microsoft. I assist enterprise customers in crafting exceptional architectures for success.

No responses yet