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 ten fold, and today I will show how.
To create Azure Container Registry, please visit the following blog post: https://www.deploycontainers.com/2018/07/07/pull-and-push-images-to-azure-container-registry-acr/
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
Publish Image ACR
To publish my image to ACR, I right click on the solution again 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.