When you plan and develop your individual functions to run in Azure Functions, you're typically focused on the code itself. Azure Functions makes it easy to deploy just your code project to a function app in Azure. When you deploy your project to a Linux function app, your code runs in a container that is created for you automatically and seamlessly integrates with Functions management tools.
Functions also supports containerized function app deployments. In a containerized deployment, you create your own function app instance in a local Docker container from a supported based image. You can then deploy this containerized function app to a hosting environment in Azure. Creating your own function app container lets you customize or otherwise control the immediate runtime environment of your function code.
Important
When you create your own containers, you're required to keep the base image of your container updated to the latest supported base image. Supported base images for Azure Functions are language-specific. See the Azure Functions base image repos.
The Functions team is committed to publishing monthly updates for these base images. Regular updates include the latest minor version updates and security fixes for both the Functions runtime and languages. You should regularly update your container from the latest base image and redeploy the updated version of your container. For more information, see Maintaining custom containers.
Container hosting optionsThere are several options for hosting your containerized function apps in Azure:
Hosting option Benefits Azure Container Apps Azure Functions provides integrated support for developing, deploying, and managing containerized function apps on Azure Container Apps. This integration enables you to manage your apps using the same Functions tools and pages in the Azure portal. Use Azure Container Apps to host your function app container in the same environment as other microservices, APIs, websites, workflows, or other container hosted programs. Container Apps hosting lets you run your functions in a managed Kubernetes-based environment with built-in support for open-source monitoring, mTLS, Dapr, and KEDA. Supports scale-to-zero and provides a serverless pay-for-what-you-use hosting model. You can also request dedicated hardware, even GPUs, by using workload profiles. Recommended hosting option for containerized function apps n Azure. Azure Arc-enabled Kubernetes clusters (preview) You can host your function apps on Azure Arc-enabled Kubernetes clusters as either a code-only deployment or in a custom Linux container. Azure Arc lets you attach Kubernetes clusters so that you can manage and configure them in Azure. Hosting Azure Functions containers on Azure Arc-enabled Kubernetes clusters is currently in preview. For more information, see Working with containers and Azure Functions. Azure Functions You can host your containerized function apps in Azure Functions by running the container in an Elastic Premium or an App Service (Dedicated) plan. Use Container Apps hosting for rich container support from Container Apps. Premium plan hosting provides you with the benefits of dynamic scaling. You might want to use Dedicated plan hosting to take advantage of existing unused App Service plan resources. Kubernetes Because the Azure Functions runtime provides flexibility in hosting where and how you want, you can host and manage your function app containers directly in Kubernetes clusters. KEDA (Kubernetes-based Event Driven Autoscaling) pairs seamlessly with the Azure Functions runtime and tooling to provide event driven scale in Kubernetes. Important: Kubernetes hosting of your containerized function apps, either by using KEDA or by direct deployment, is an open-source effort that you can use free of cost. Best-effort support for this hosting scenario is provided only by contributors and by the community. You're responsible for maintaining your own function app containers in a cluster, even when deploying them to Azure Kubernetes Service (AKS). Feature support comparisonThe degree to which various features and behaviors of Azure Functions are supported when running your function app in a container depends on the container hosting option you choose.
When creating your own containers, you're required to keep the base image of your container updated to the latest supported base image. Supported base images for Azure Functions are language-specific and are found in the Azure Functions base image repos.
The Functions team is committed to publishing monthly updates for these base images. Regular updates include the latest minor version updates and security fixes for both the Functions runtime and languages. You should regularly update your container from the latest base image and redeploy the updated version of your container.
Choose your base image based on the language stack you're using in your function app. The following table provides examples for each stack. In general, the tag should start with 4-
to indicate the V4 Functions runtime. When new minor versions are released, this tag will be updated to point to the new version. As you periodically rebuild your custom image, you will pull the new versions through that same tag, allowing your app to have the same updates. You shouldn't use tags that specify minor runtime versions, as these will not receive updates, and your app will potentially remain on an unpatched version, no matter how often you rebuild your custom image.
mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0
or
mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0-appservice
(These examples target .NET 8. Select the appropriate image for the .NET version you need.)
.NET (legacy in-process model)mcr.microsoft.com/azure-functions/dotnet:4-dotnet8.0
or
mcr.microsoft.com/azure-functions/dotnet:4-dotnet8.0-appservice
(Support will end for the in-process model on November 10, 2026. You should migrate to the isolated worker model as soon as possible.)
Javamcr.microsoft.com/azure-functions/java:4-java21
or
mcr.microsoft.com/azure-functions/java:4-java21-appservice
(These examples target Java 21. Select the appropriate image for the Java version you need.)
Node.js (JavaScript or TypeScript)mcr.microsoft.com/azure-functions/node:4-node22
or
mcr.microsoft.com/azure-functions/node:4-node22-appservice
(These examples target Node.js 22. Select the appropriate image for the Node.js version you need.)
PowerShellmcr.microsoft.com/azure-functions/powershell:4-powershell7.4
or
mcr.microsoft.com/azure-functions/powershell:4-powershell7.4-appservice
(These examples target PowerShell 7.4. Select the appropriate image for the PowerShell version you need.)
Pythonmcr.microsoft.com/azure-functions/python:4-python3.12
or
mcr.microsoft.com/azure-functions/python:4-python3.12-appservice
(These examples target Python 3.12. Select the appropriate image for the Python version you need.)
Custom handlers / othermcr.microsoft.com/azure-functions/base:4
or
mcr.microsoft.com/azure-functions/base:4-appservice
Base images ending in -appservice
enable SSH and remote debugging from the platform. Unless you need these capabilities, you can use the base images without the -appservice
suffix.
Important
It isn't sufficient to just have one of the above tags in your Dockerfile. You need to regularly pull the latest image from that tag so that your custom image can be rebuilt to include the latest updates. If you don't pull the latest image and rebuild, your app will continue to run on the old base image.
When you create or deploy your own containerized app using a custom image, you're responsible for making sure that your custom image staying up-to-date with our released base images. In addition to new features and improvements, these base image updates can also include security updates that are critical for your app. To ensure your app is protected, make sure you're staying up to date. You should regularly pull the latest version of the base image, rebuild your custom container image, and redeploy your app to use it.
In some cases, we're required to make platform-level changes that could mean that an app in a custom container using an old base image might stop working properly. For such major changes, we roll out updated images well in advance so that apps that take regular updates aren't negatively impacted. To avoid potential problems with your apps running in custom containers, make sure you don't fall too far behind the latest minor version released. During a support case, should we determine that your app is experiencing problems because it's on an older or unsupported version, we do request that you update your container to the latest base image version before continuing with support.
Getting startedUse these links to get started working with Azure Functions in Linux containers:
Related articlesRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4