Setting up Docker environments in Visual Studio
In this section, we will explore how to leverage Docker support. Docker support in Visual Studio provides a seamless experience for developing applications that are intended to run inside Docker containers. Docker support can be added to a Visual Studio project during project creation or added to an existing project.
Creating a project with Docker support
Assuming you have Docker Desktop installed and running, the first thing to do is to create a new project.
We will create an ASP.NET Core application as usual and in the Additional information window, we will check the Enable container support checkbox:
Figure 12.1 – Enable container support
Once checked, it enables the two text boxes, Container OS and Container build type, to configure the container type. We can select either Windows or Linux for the Container OS option based on our requirements. For Container build type, we can select either...