Enable Docker Support On Visual Studio20 Jul 2020 | CSharp-ASP.NET Core Visual Studio
It is significant that knowing how to use Visual Studio Docker Tools for dotnet developers. You’ve learned how to deploy your dotnet core apps in docker in the preceding article. Let’s reveal the docker tools on Visual Studio editor before we dive into further. This blog aims to illustrate those docker tools, but wouldn’t get into the details.
For now, the latest version of the visual studio is 2019, which has supported two principal features of docker(Docker Support and Orchestrator Support).
In section1, we build our app through CIL(using
dotnet command) and then publish it as well as in the CIL environment(using
docker command). Visual Studio 2019 assembled those features in UI, and hence we can finish these steps through Visual Studio, instead of CIL.
You can add Docker support on either a new project or an existing project.
Adding Docker support on a creating project(from microsoft doc)
Adding Docker Support on an existing project(from microsoft doc)
If you select Docker Support, then Visual Studio will generate a Dockerfile under your project. You can use the Dockerfile to build and manage your images and containers, as the previous article did.
If you want to compose a multi-container solution, then select the Container Orchestrator Support option, which enables you to debug and run a group of containers at the same time. Visual Studio will create a new project when you clicked the Container Orchestrator Support option. That is because orchestrators are tools to manage, scale, and maintain containerized applications, so Visual Studio made a third isolated project to finish this management.
Adding a Docker Compose support on an existing project(from microsoft doc)
You can add multiple projects into a single docker-compose. When you add a new project into a docker-compose, then the docker-compose will reference that project’s Dockerfile into the docker-compose.yml file. When you launch the docker-compose, all the related Dockerfile will be launched at the same time.