NET Core app using Docker, Azure DevOps, Azure Container Registry

NET Core app using Docker, Azure DevOps, Azure Container Registry

This is a guide on how to use Azure DevOps to build and then publish a docker image as an Azure App Service, using Azure Container Registry.

This is a guide on how to use Azure DevOps to build and then publish a docker image as an Azure App Service, using Azure Container Registry.

Prerequisites

This guide assumes basic knowledge in Docker and more specifically how to create a Dockerfile. This docker cheat sheet provides a ready Dockerfile with explanations, plus an easy way to create your own Dockerfile from within Visual Studio. The guide also requires an account on Azure and Azure DevOps. The code is hosted in Azure DevOps, but almost any -accessible from Azure DevOps- version control system will do.

In the process that follows, we setup three things mainly; An Azure Container Registry to hold the Docker Image, an Azure DevOps Pipeline to build and push the image to the registry, and and Azure App Service that will continuously pull the image from the registry.

Steps to setup Azure Container Registry

In order to setup an Azure Container Registry, you will of course need to visit portal.azure.com first. After signing in, follow the next three steps to setup and configure Azure Container Registry correctly:

Step 1

Use the convenient search bar on top to search for “_Container Registry_“. Once the results are in, click on the left side on the “_Container Registry_” result, as shown here:

Azure Container Registry - Search

Step 2

Once you clicked on the correct result, the “Create Container Registry_” form will appear and a few selections have to be made. The minimum changes required here, are to select the _Subscription and Resource group you wish (you can also create a new recourse), and to write the Registry name you prefer. Change the Location and SKU if needed and click Create once done.

Azure Container Registry - Create

The Registry name is part of the Login Server for your Azure Container Registry. In this example it will be registryaspnetcoredockerdemo.azurecr.io.

Step 3

Enable the Admin user for this Container Registry. Although the admin account is designed for a single user to access the registry, mainly for testing purposes, in order to be able to use the current registry from an App Service and select image source and Continuous Deployment, the Admin user must be enabled. Find this resource and go to Access Keys to enable the Admin user, as shown below:

Azure Container Registry - Enable Admin User

Read more information about the Admin Account in Microsoft Docs

azure docker azure app service azure devops devops

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Create, Build, Deploy and Configure an Azure App Service with Azure DevOps and Azure CLI

This post shows how to create, build, deploy and configure an Azure App Service using Azure DevOps, Azure CLI and Powershell.

Turning Azure DevOps Service On or Off - Daily .NET Tips

Turning Azure DevOps Service On or Off gives you a project level DevOps service control. You can Turn on or Off Azure DevOps Services as per your need for any specific project. In case you do not need any specific service for your DevOps team project, you can turn that off from DevOps. Once you turned off the… Read More »

Mobile App Marketing Services - App Store Optimization | Digiadlab

Mobile App Marketing is important for today's app-based businesses and App Store Optimization (ASO) plays an important part in a strong marketing strategy

How long does it take to develop/build an app?

This article covers A-Z about the mobile and web app development process and answers your question on how long does it take to develop/build an app.

Static Web App PR Workflow for Azure App Service Using Azure DevOps

Static Web App PR Workflow for Azure App Service using Azure DevOps Microsoft recently announced a new Azure service called Static Web Apps. Static Web Apps are tailored for apps with their code in GitHub with static content (html/javascript/css) and backend api’s.