I know that it is possible to create a Docker container based on the Azure Functions runtime. An example of this process is described in this article.
The benefit is that Azure Functions can be used anywhere - I could deploy the Container to AWS if I wanted.
But here's where it's becoming unclear to me: When you create a new Functions app in Azure portal, there’s a switch labeled “Publish” and it allows the select either “Code” or “Docker Container”.
If I select "Docker Container", I can configure a Docker image to be used. This is documented in Microsoft's docs.
My questions are:
- Why would I want to deploy a Docker container, that contains the Functions runtime into a Functions App, instead of just deploying it to Azure Container Instances?
- How does the container approach affect scaling? Who is responsible for scheduling and executing the functions? The runtime in the container, or the Functions runtime on Azure?