3

I have these three release steps in Azure De Ops:

  1. AzureRmWebAppDeployment@4 - which deploys a docker image to my staging site
  2. AzureResourceGroupDeployment@2 which deploys all the appsettings and properties with an ARM template
  3. AzureAppServiceManage@0 - it swaps staging into production

Step 1 is applied so I am sure that the docker image is pulled to the staging slot (without it and only applying the ARM the swap begins before the pull is over, and I dont like that). Step 2 is to be sure that all environment variables and properties. Step 1 adds the DOCKER_CUSTOM_IMAGE_NAME environment variable and by that triggers a docker pull, but in step 3 I manually set the linuxFxVersion property. Both points to the same image tag. I don't set the DOCKER_CUSTOM_IMAGE_NAME in my ARM template, so when I deploy my ARM, only linuxFxVersion is set. But in essence it pulls nothing, because step 2 has already pulled the image.

Is there anything wrong in removing the DOCKER_CUSTOM_IMAGE_NAME? Or? What is the difference between linuFxVersion and DOCKER_CUSTOM_IMAGE_NAME? Do I need both, or is one of them good enough?

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
mslot
  • 4,959
  • 9
  • 44
  • 76
  • To use a custom image from a public Docker Hub registry, the application need to have this specific application setting `DOCKER_CUSTOM_IMAGE_NAME` –  Feb 25 '20 at 15:23
  • @blank but the AzureRmWebAppDeployment@4 sets both linuxFxVersion and DOCKER_CUSTOM_IMAGE_NAME. But I can easily leave one of them out and still get my docker pulled. What are the difference? – mslot Feb 25 '20 at 16:14

1 Answers1

5

LinuxFxVersion and DOCKER_CUSTOM_IMAGE_NAME are both ways to specify the image to be used in a Linux function app or a Linux web app.

LinuxFxVersion is given higher precedence. If that value is invalid or empty,it would use DOCKER_CUSTOM_IMAGE_NAME. LinuxFxVersion is recommended since it can be used to set both custom container images as well as blessed images.

sa23
  • 328
  • 2
  • 5
  • 2
    where do you find this inforamtion? – zolty13 Nov 19 '21 at 18:13
  • @zolty13 Just found it in Azure Docs https://learn.microsoft.com/en-us/azure/app-service/tutorial-custom-container?pivots=container-linux#deploy-the-image-and-test-the-app inside the tip block under Deploy the image and test the app – Daniil Samoylov Aug 23 '22 at 07:01