Share via


Continuous deployment with Web App for Containers using Azure Container Registry - Part 1

Continuous deployment with Web App for Containers

In this article we will see how can create a Azure Web app for container (on Linux) and setup an docker / custom image on it.

Once that it done we shall automate the deployment which will be triggered and deployed to our web app as soon as we push the container image to our Azure Container Registry

Steps summary:

Setting up Docker :

  1. Download docker CLI or docker for windows.
  2. Signup for a docker account.
  3. Login to docker / CLI on your PC.
  4. Download any container image from Docker hub to local using CLI.
  5. Tag the image.
  6. Verify image is up and running on local.

Setting up Azure Container Registry:

  1. Create an Azure Container Registry.
  2. Login to Azure Container Registry from docker.
  3. Map the Tagged container image with Azure Container Registry account with a repository name and tags.
  4. Push the local docker image to Azure Container

Setting up Azure Web app for container for that Image:

  1. Create Web app for container.
  2. In Docker Container option, select the Azure Container registry.
  3. Select the values for Registry, Image, Tag & hit Save.
  4. Restart the Web App. (optional)
  5. Browser the web app to see if the image is up and running on Web app.

Setting up Continuous Deployment for Azure Web app for container for that Image:

  1. Enable the auto deployment mode on Web app.
  2. Get the service URL from publishing profile.
  3. Go to Azure Container Registry & create Web hook.
  4. Fill up the values and save and do a test ping.

Verifying Continuous Deployment:

  1. Go to Docker CLI.
  2. Modify the image or give the same tag mapping to any other image.
  3. Push the image to Azure Container
  4. Restart the Web app.
  5. Browse the web app to see that new image is up and running.
  6. After some time, the auto deployment logs are visible in the Azure Container Registryà Web hook à Logs/events

 

So, if you haven’t sleep so far, let’s see it in action my next Post here :
continuous deployment with web app for containers using azure container registry -part-2