question

AaronBidwell-5561 avatar image
0 Votes"
AaronBidwell-5561 asked ajkuma-MSFT edited

Rebuild Image for App Service without code change

I have an app service hosting a front end application by way of ACR. The front end is a cms application that requires rebuilds whenever I make changes to the back end data. I would like a way to rebuild the image in the App service without making a code change.

azure-webappsazure-container-registry
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AaronBidwell-5561,

Thanks for the good question. While I check on this, could you please share some more details about your requirement?

Just to start with, if your requirement fits: you may add a Build&Push step in the pipeline that can automate this in ACR, please see this doc: https://docs.microsoft.com/azure/devops/pipelines/ecosystems/containers/acr-template?view=azure-devops

If it’s easier, you could change to built-in images and copy in the code on deployment (i.e Linux AppService code).

Deployment Slots (staging and production) approach maybe a nice idea for your case. It will allow staging but when you’re using images (ACR option in this case) the image can be reverted quick by updating tag (slot option, maybe good for Staging only).

As a side note, Add the full image name, including the private registry URL (for example, myacr.azurecr.io/dotnet:latest).
Image names that use a custom port cannot be entered through the portal. To set docker-custom-image-name, use the az command-line tool.


0 Votes 0 ·

1 Answer

ajkuma-MSFT avatar image
0 Votes"
ajkuma-MSFT answered ajkuma-MSFT edited

@AaronBidwell-5561,

Just to highlight, ACR is a repository of images, and if you need to rebuild an image, you need to do that outside of ACR.

You may use ADO pipelines to rebuild the image or you can use ACR Tasks to rebuild the image. You can trigger an ACR Task to do the build and store the new image in ACR.

As mentioned, you may add a Build&Push step in the pipeline that can automate this in ACR, please see this doc.

Please see, automate container image builds and maintenance with ACR Tasks

See continuous deployment doc, you can enable CI/CD, so that App Service gets notified of a new image and triggers a pull automatically.

Based on my understanding of your scenario, I have shared the options that you could leverage. Please let me know if it helps or/As requested share additional information about your requirement to better assist you.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.