Deploying a Function App with --deployment-container-image-name can result in a Function App that will not start.
See original GitHub issue
az feedback
auto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug The validation for --deployment-container-image-name can result in a Function App that will start as it sets the LinuxFxVersion correctly.
The linuxFxVersion should be <DockerId>/imagename:tags>
The validation logic at https://github.com/Azure/azure-cli/blob/6c1b085a0910c6c2139006fcbd8ade44006eb6dd/src/azure-cli/azure/cli/command_modules/appservice/custom.py#L1227 doesn’t seem to check this for the Functions scenarios.
To Reproduce
- Install the newest Az Cli.
- Create a Storage Account, Resource Group and Managed Identity.
- Run this command.
az functionapp create --name <appNane> --resource-group <resourceGroupName> \ –storage-account <storageAccountName> \ –plan <planName \ –functions-version 3 \ –runtime python \ –os-type Linux \ –deployment-container-image-name imageName:tags \ –assign-identity <appIdentity>
- You will see a Function App that is created but has no Functions and returns a Server error.
- The internal logs show the docker pull is failing/
- Updating the Linux Fx Version to DockerId/imagename:tags works.
Expected behavior
- That the Function App starts.
Environment summary Reproduced using the Azure Cloud Shell.
Additional context https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-function-linux-custom-image https://docs.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux#change-the-docker-image-of-a-custom-container
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top GitHub Comments
route to CXP team to help with
@zandym - Thanks for the details. I understand the issue better now. Yes,
--deployment-container-image-name
command should set thelinuxFxVersion
and should not require user to run another command.We will add validation if the image is valid or not on the platform.
For this - please open an issue on https://github.com/Azure/azure-functions-docker with details on the AppName / appx time range. We need to take a look the logs to understand why other registries are not working.