Build, Run, and Continuously Deploy Docker Containers on Azure App Service

I’ll show you a quick and easy way to store and run your container images on Microsoft’s Azure platform.We’ll take a look at how to build a container image locally, push that image to the Azure Container Registry, and then run and continuously deploy updates to that container using Azure Web App for Containers..It’s a great way to run a single container for a web application.We’ll keep things simple, but practical..And, if you want to follow along, all you’ll need is Git and Docker Desktop installed locally, along with an Azure account.Building the Azure Container Registry (ACR) ResourceContainer images provide the foundation for applications running inside Docker containers..You can think of an image as an executable package that includes everything you need to run an application..Your container images include application code, the runtime environment, libraries, configuration files, and environment variables..Containers that you spin up to power an application are merely a running instance of a container image.Container images live in public or private container registries, and servers running the Docker engine download those images to start and run containers..The default container registry for Docker containers is hub.docker.com, which offers over 100,000 container images from ISVs, open-source projects, and community contributors..You can use this service to store your images in public or private repositories.Microsoft also offers the Azure Container Registry (ACR), which is a managed Docker registry service based on the open-source Docker Registry 2.0 platform.Using ACR for container deployments allows you to store your custom container images privately in the Azure cloud..ACR natively integrates with multiple Azure services, and teams can use ACR tasks to automate deployments when building new images, or when code is committed to version control..ACR also provides a low-latency endpoint to pull images from when your Docker hosts are running in the Azure cloud.For this tutorial, we’re going to provision a new ACR instance..We’ll build a custom Docker image and push it to ACR so we can use it later with Azure Web App for containers.In the Azure portal, select Create a resource, select Containers in the Azure Marketplace, and choose Container Registry.Figure 1..Creating an ACR Resource.Enter a globally unique, DNS-compliant hostname for your registry under the azurecr.io namespace.. More details

Leave a Reply