Continuous deployment with Web App for Containers

In this tutorial, you configure continuous deployment for a custom container image from managed Azure Container Registry repositories or Docker Hub.

Enable continuous deployment with ACR

Screenshot of ACR webhook

  1. Sign in to the Azure portal.
  2. Select the App Service option on the left side of the page.
  3. Select the name of the app for which you want to configure continuous deployment.
  4. On the Container Settings page, select Single Container
  5. Select Azure Container Registry
  6. Select Continuous Deployment > On
  7. Select Save to enable continuous deployment.

Use the ACR webhook

Once Continuous Deployment has been enabled, you can view the newly created webhook on your Azure Container Registry webhooks page.

Screenshot that shows where you can view the newly created webhook on your Azure Container Registry webhooks page.

In your Container Registry, click on Webhooks to view the current webhooks.

Enable continuous deployment with Docker Hub (optional)

  1. Sign in to the Azure portal.
  2. Select the App Service option on the left side of the page.
  3. Select the name of the app for which you want to configure continuous deployment.
  4. On the Container Settings page, select Single Container
  5. Select Docker Hub
  6. Select Continuous Deployment > On
  7. Select Save to enable continuous deployment.

Screenshot of app setting

Copy the Webhook URL. To add a webhook for Docker Hub, follow webhooks for Docker Hub.

Automate with CLI

To configure CI/CD using the Azure CLI, run the az webapp deployment container config command to generate the webhook URL. The URL can be used to configure your DockerHub or Azure Container Registry.

az webapp deployment container config --name <app-name> --resource-group <group-name> --enable-cd true

Next steps