program '/functions_debugging_cli/func' does not exist in docker azure function app

Wuite, Edward 0 Reputation points
2024-02-13T16:23:31.9233333+00:00

I get the error "program '/functions_debugging_cli/func' does not exist" when trying to run an azure function app locally in a docker container. Browsing the docker image I learned that the /functions_debugging_cli/ folder doesn't exist, so that figures. Question is: why isn't this there in the image in the first place, and how can I get it there?

Software used:

  • Docker Deskop for Windows installed (my version: 4.27.1, client 25.0.2, server 25.0.2), using WSL2
  • Visual Studio 2022 LTSC 17.8

Reproduction steps:

  • Create an Azure Function app in VS
  • Wait for AzureFunctionsTools to install
  • Select .NET8.0 Isolated (Long Term Support)
  • Select Queue Trigger (in my case at least)
  • Enable Docker
  • Fill in other required field and finish
  • Update nuget packages (why are these not already the latest versions? Else the next step fails...)
  • Add the Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues package (why is this missing, resulting in an immediate build error with boilerplate code?)
  • Build solution and debug as Docker. Wait for everything to get setup and then I get the error.

Trying to find a solution for this error, I found this SO answer: https://stackoverflow.com/a/66545118 which looked to be a promising direction. Logging into the newly created docker container (using docker exec -t -i {container name} /bin/bash in a command prompt) I tried to get the azure function tools installed manually first, to see if this was viable, using some adapted steps from here: https://github.com/Azure/azure-functions-core-tools/blob/master/README.md#azure-functions-core-tools

Apparently, the docker container runs Debian 12. That website only goes to 11 and assumes some packages are already installed. Also, Microsoft has this link for Debian 12 repositories: https://packages.microsoft.com/config/debian/12/

Since Debian 12 handles signing new repositories a little different, I ended up using the following script, instead of what was mentioned for Debian10/11:

DEBIAN_VERSION=12

apt-get install -y wget
apt-get install -y curl
apt-get install -y gpg
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
cp usr/share/keyrings/microsoft-prod.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/debian/$DEBIAN_VERSION/prod.list
mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
chown root:root /etc/apt/trusted.gpg.d/microsoft-prod.gpg
chown root:root /etc/apt/sources.list.d/microsoft-prod.list

After this, running apt-get update recognizes the new repository, but unfortunately it still doesn't recognize the azure functions tools package, so apt-get install azure-functions-core-tools-3 still fails.

After that, I also tried targetting the version 11 repository instead. This one DOES contain the tools package, but then running func results in an error mentioning Couldn't find a valid ICU package installed on the system which supposedly should be the libicu* package (* being either -dev or 72 in this specific version of the image). Installing that doesn't resolve that error, and also starting/debugging the function app itself in the container still yields the same error as in the start, so that solves nothing either. I'm at a loss at this point. How do I get a linux docker image properly setup with the required azure function tools installed as well?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,978 questions
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
419 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,321 Reputation points
    2024-02-20T15:25:37.7866667+00:00

    Wuite, Edward Thanks for posting your question in Microsoft Q&A. Azure Functions Core Tools is not supported for Debian 12 and please check Debian 12 (bookworm) support issue related to this. You can try the workaround shared in this comment i.e. installing azure-functions-core-tools-4 on Debian 12 instead of azure-functions-core-tools-3. Let me know if it helps or still face any issues. You can also submit a new issue via https://github.com/Azure/azure-functions-core-tools/issues.


    If you found the answer to your question helpful, please take a moment to mark it as Yes for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.