Azure docker: linuxFxVersion vs DOCKER_CUSTOM_IMAGE_NAME

Viewed 1630

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?

1 Answers

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.

Related