Publish .NET Core Container Image to ACR from VS 2017

In this blog post, I will show you how I publish an ASP.NET Core Container image to Microsoft Azure Container Registry directly from Visual Studio 2017.

Ever since Microsoft Visual Studio team released the Docker support tools for VS the integration between Docker, Azure and VS has become seamless.

Using VS Tools for Docker and Azure deployment time and effort have reduced 10 fold, and today I will show how,

Enable Docker Support

The first step in this process is to enable Docker support I on my ASP.NET Core project and to do I right-click on my Solution select Add and click on Docker Support

Below, you can see the Docker Support option.

Because I am using ASP.NET Core project, I have the option to use Windows or Linux docker image.

In my case, I am using Windows

To publish my image to ACR, I right-click on the solution gain and click on Publish

From the Publish page, I click on Start

From the Target selection page, I select Container Registry and select Azure Container Registry.

Because I have created my Registry before all I need to do is select it and click OK.

The only thing left for me to do now is to click on Publish and watch the upload process.

Once the image has been uploaded, I can run a Container instance from ACR directly.


Posted

in

by