Create your first Docker container with an ASP.NET web app

Publish to Azure Container Registry

Now that you have created a container image, you can publish it to Azure Container Registry. This allows you to pull and run your container on any machine that is running Docker and has access to your ACR instance.

In the Solution Explorer, right-click the myFirstContainerApp project and select Publish.

Publish from Solution Explorer

Click Container Registry and make sure “Create New Azure Container Registry” is selected. Click Publish.

Publish from project overview page

This opens the Create a new Azure Container Registry dialog, which helps you create all the necessary Azure resources to run the ASP.NET web app in Azure.

Sign in to Azure

In the Create a new Azure Container Registry dialog, select Add an account, and sign in to your Azure subscription. If you’re already signed in, select the account containing the desired subscription from the dropdown.

If you’re already signed in, don’t select Create yet.

Sign in to Azure

Create a resource group

A resource group is a logical container into which Azure resources like web apps, databases, and storage accounts are deployed and managed.

Next to Resource Group, select New.

Name the resource group myResourceGroup and select OK.

Create and publish the container image

In DNS Prefix, type a unique container image name, or accept the automatically generated unique name.

Select Create to start creating the Azure resources.

Once the wizard completes, it publishes your container image to Azure Container Registry. The publish confirmation page shows the URL and image name.

Publish confirmation page

Congratulations, your ASP.NET web app container image is published to Azure Container Registry.

I ran into an issue I have published my container to ACR