Microsoft Azure - Container Registry For Deploying .NET Core Apps
Last Updated :
02 Aug, 2023
Azure Container Registry to run a .NET Core App Azure Container Registry is a place where you can store your container images securely. Let's deploy a container image to it and see how we can use it. To follow along, we'll need to Visual Studio and Docker Desktop. Dockerfile is the source code for Docker image before pushing the images into the ACR you need to write the Dockerfile according to your needs in an efficient manner.
Features Of Microsoft Azure - Container Registry
Following are some of the key features of the Azure container registry.
- Private Container Image Registry: Azure Container Registry will store your Docker images in a private Docker registry and secure repository where without proper permissions no one can access the images the images are more secure than in the DockerHub.
- Standard Image Pushing: You can push the images to Microsoft Azure - Container Registry in a standard and the same you use to push into the DockerHub. You can store any type of image like Linux, Windows, and any other OS images easily and securely.
- Fully Managed service: Microsoft Azure - Container Registry is a fully managed service there is no need to worry about anything like infrastructure and security you just need to focus on building the image proficiently.
- High Availability Of Images: Once you pushed your Docker image to Azure - Container Registry you can be very confident that whenever you had the usage of the image you can access the image if you had proper authorization.
Moreover, you can integrate the Microsoft Azure - Container Registry with the Azure services according to your requirements like AKS services and so on.
Security of Azure Container Registry
- Role-Based Access Control (RBAC): ACR can be managed with the help of RABAC microsoft azure you can assign a certain level of permissions to the users and resources available in Azure like what exactly a user or service can perform on the RBAC. You can give access to some users only to pull the images and for other certain users you can provide to pull and push the images and the same applies to resources also.
- Image Scanning: The images which are pushed to the ACR will be scanned before storing into the repositories and if it finds any type of vulnerabilities you can it will detect and give the notifications to us.
- Image Encryption: Images that are going to be stored in the repositories will be encrypted.
- Logging History: ACR maintains each and every task performed on the repositories and images in the form of logs where you can access the logs and see all the tasks performed on the repositories.
- Isolate The Image: ACR can block the IP address which you don't want to access the images this will add an extra layer of protection to our images registry.
Pricing of Azure Container Registry
The pricing of ACR is depended on the amount of storage you are going to use and the size of the image you can store one image for free and sometimes it may charge based on the data transfer you have done also.
- Storage Usage: The pricing of ACR is mainly based upon the amount of storage you going to use the size of images is high then the storage usage will be high and the pricing will vary according to it.
- Free Tier: You can store the Docker images in the ACR for free up to 30 days from the beginning. The maximum limit of the ACR free tier is 10 GB.
|
Standard
| $0.165
| 10 GB
|
premium
| $0.668
| 100 GB
|
Shared
| $1.669
| 500 GB
|
The above-mentioned prices may vary depending on the usage of the storage this approximate prices of certain usage.
Use Cases Microsoft Azure - Container Registry
- Integrates With Other Services: You can integrate the ACR with other resources like AKS and Azure Container Apps with proper permissions these services can push and pull the images.
- CI/CD: You can push and pull the images while Continuous integration and continuous deployment also and some of the most commonly used tools are Jenkins pipeline and Azure pipelines.
- Completely Private Registry: ACR is a complete private registry where pushing and pulling the images to the repositories is very hard without complete authorization and authentications. So your image is completely free from unauthorized access.
- Hybrid Cloud Deployments: You can deploy your images in the form of containers on your on-premises servers while storing the images in the ACR.
Create An Azure Container Registry Using The Azure Portal
Follow the below steps to use the Azure container registry for deploying .NET core Apps
Step 1: In Visual Studio, we've created a new .Net Core Console App. It's very simple and only outputs "Hello World" to the console.

Step 2: Let's add Docker supports to it, and choose a "Linux". Now, it has a Dockerfile that describes the container image for the app.


Step 3: Let's publish this to an Azure Container Registry. First, we choose Azure and the Azure Container Registry, that's it.

Step 4: We'll choose an existing Azure container Registry. We can also create a new one if we like, and finish and now publish it.

In the Azure Container Registry. We can store many container images here and use lots of features like tasks that automate deployment and patching of the images.
Step 5: Let's go to the Repositories menu. Here, is the tag of the image that we've just published. Now from here, we can deploy and run this container image to a web app or to a container instance.

Step 6: Let's do the last one. We just need to enter a name and we'll leave the rest as it is. This creates an Azure Container Instance, which is perfect for running a single container.

Step 7: In the Azure Container Instance. Let's see its containers here. It has been busy with our container. Let's see. Here in the logs, we can see the output of the console app that now runs in a container in the Container Instance.

The Azure Container Registry is a managed and safe place to store our container images that provides features like geo-replication and an easy way to run our containers in Azure Container Instances.
Similar Reads
Microsoft Azure - Container Registration for App Deployment
In this article, we will learn how to use Azure Container Registry to run a .NET Core App. Azure Container Registry is a place where you can store your container images securely. Let's deploy a container image to it and see how we can use it. To follow along, you'll need the following: Visual Studio
2 min read
Azure Container Registry for Docker Container Management
Azure Container Registry (ACR) is one of the Azure services that allow managing and storing Docker images. It provides a safe and personal space to store and execute Docker containers together with with the Docker images that contain them. This cloud solution is highly compatible with other Azure so
5 min read
How To Deploy A Container To Azure Container Instances ?
In layman's terms, how will it feel when a developer develops an app and a member of the testing team tries to test the application on his/her OS? They will have to install the packages, and libraries required to run the app. Well, in this case, the container makes it easy and faster to rapidly depl
8 min read
Microsoft Azure - Mount Azure Storage in Container App In App Service
In this article, we are going to learn how to mount Azure Storage as a local share for App Services Linux web apps. Implementation: So to start the process of connecting to Azure Storage mount, you should click on configuration. Once you are inside the configuration blade, click on path mappings. St
3 min read
Microsoft Azure - Configuring Backup For Azure App Services
In this article, we will look into the process of configuring a backup for your Azure app servers and database. Follow the below steps to create a backup for your Azure Apps and databases: Step 1: Go to your application blade and type in "backups" and click on the Backups option. Step 2: Now, we'll
2 min read
Microsoft Azure - Running an App inside a Docker Container Image
In this article, we'll learn how to run an app inside of a container with Docker. For this, you need to set up Docker on your local Dev machine, by going to docker.com, and installing the Docker desktop application for your specific operating system. We can use the Docker Pokemon to pull an image fr
2 min read
Microsoft Azure - Deploy Azure Functions using VS Code
In this article, we will learn how to deploy Azure functions with Visual Studio Code. To deploy an Azure function out from within Visual Studio Code, we are going to open the command palette. Now follow the below steps to deploy the Azure function: Step 1: First, we are going to type "deploy functio
2 min read
Microsoft Azure - Create Web Apps in Azure
Here, In this article, we'll see how we can create an App Service Web App which lets you quickly build, deploy, and scale enterprise-grade web, mobile, and API apps running on any platform. App Service allows you to select your runtime stack (available stacks: Python, .Net, Java, PHP, Node, Ruby) wh
2 min read
Microsoft Azure - Create App Services in Azure Portal
In this article, we will learn about the new and improved experience for creating App Services. Azure App Service lets you create apps faster with a one-of-a-kind cloud service to quickly and easily create enterprise-ready web and mobile apps for any platform or device and deploy them on a scalable
5 min read
Microsoft Azure - Using Deployment Slots For Web App
In this article, you will come to know about one of the best features of Microsoft Azure that offers in cloud user environment about the deployment of your own application in web server called deployment slots. Microsoft developed the cloud named Azure in 2008 for managing applications and the funct
4 min read