An Azure service that provides an event-driven serverless compute platform.
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .
Issue: When deploying an Azure Function from a custom container using the Consumption plan, the function runs locally but fails to start in Azure, resulting in the error message: "0 functions found."
Solution: It turns out that only the Premium or higher Azure Function plan supports running in a container. If you use the Consumption plan, the option to "Deploy as Container Image" is unavailable. Without this option enabled, even with all environment variables properly set, the container will not start correctly, leading to the "0 functions found" error.
To resolve this issue:
- Switch to a Premium or better plan for your Azure Function.
- Ensure the "Deploy as Container Image" option is selected when configuring your function.
Once these steps are followed, the function should run successfully in Azure.
If you have any other questions or are still encountering issues, please let me know.
Thank you again for your time and patience throughout this issue.
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.
If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.