How can I force an azure Web app to re-pull its container?

4.2k views Asked by At

I have pushed a container update to a private ACR. My webapp is configured with the registry's admin credentials, and to pull the image tagged "latest". According to Step 2 in Part 6 of this page: https://learn.microsoft.com/en-us/azure/developer/javascript/tutorial/tutorial-vscode-docker-node/tutorial-vscode-docker-node-06

Restarting an app service automatically pulls the latest container image from the registry.

This is not happening for me. When I go to the portal and restart the app service nothing happens. The deployment logs reflect the last time the app successfully deployed which was over a month ago. I can verify that the image was successfully updated in the registry.

Is there some other way I can force the service to re-pull and launch the container? Are there any logs I could use to troubleshoot issues connecting to and pulling from the ACR?

1

There are 1 answers

2
HowAreYou On

Verify the connnectivity between the the azure webapp for conatiners and ACR in deployment center. enter image description here And make sure the password in app service configuration settings is correct. I faced the same when I have tested with wrong password after the initial deployment to web app.

enter image description here

Enable continuous deployment for seamless deployment on azure app service deployment and copy the webhook URL. enter image description here

Configure webhook in container registry as below.

enter image description here

enter image description here

Once, we configured webhook connection, no need to restart the app service to pull the latest image from ACR. Whenever a new image version pushed to ACR, azure web app will automatically pull the image. It will take 2 to 5 mins to serve requests. While testing, try to browse in incognito tab to see changes immediately.