-
Notifications
You must be signed in to change notification settings - Fork 441
Using LinuxFxVersion for Linux Function Apps
Linux function apps use the 'LinuxFxVersion' config field to specify the host or the language version property for the app.
Linux function apps for all skus use the language and the language version specified in the 'LinuxFxVersion' config. The general format is "language|language version". For example: a node 12 linux function app will have it's linuxfxversion field set to "node|12". The language specified in the linuxfxversion must also match the worker runtime specified in the 'FUNCTIONS_WORKER_RUNTIME' app setting.
Upgrading the language version of an existing function app can be done by updating the linuxfxversion. For example: A python 3.7 function app with linuxfxversion 'python|3.7' can move to python 3.8 by updating their linuxfxversion to 'python|3.8'.
When an app has LinuxFxVersion
set in the 'language|language version' format specified above, it means that the app is set to the latest functions host version. If for any reason, a function app does not want to use the latest functions host version, then the app can be pinned to a particular host version. This is done by directly specifying the image URL in LinuxFxVersion
field. For example: if we want to pin a node 10 function app to say host version 3.0.13142 -
Set LinuxFxVersion to 'DOCKER|mcr.microsoft.com/azure-functions/node:3.0.13142-node10-appservice' using Az CLI-
az functionapp config set \
-g <resource_group> \
-n <function_app_name> \
--subscription <subscription_id> \
--linux-fx-version "DOCKER|mcr.microsoft.com/azure-functions/node:4.8.0-python3.9-appservice"
Set LinuxFxVersion to 'DOCKER|mcr.microsoft.com/azure-functions/mesh:3.0.13142-node10' using Az CLI-
az functionapp config set \
-g <resource_group> \
-n <function_app_name> \
--subscription <subscription_id> \
--linux-fx-version "DOCKER|mcr.microsoft.com/azure-functions/mesh:4.8.0-python3.9"
Note that setting linuxfxversion
to image URL directly for consumption apps will opt them out of placeholders and other cold start optimizations. So apps should only be pinned to an older host version in case of a regression in the latest functions host version.
- Configuration Settings
- function.json
- host.json
- host.json (v2)
- Http Functions
- Function Runtime Versioning
- Official Functions developers guide
- Host Health Monitor
- Managing Connections
- Renaming a Function
- Retrieving information about the currently running function
- Site Extension Resolution
- Linux Consumption Regions
- Using LinuxFxVersion for Linux Function apps
- Out-of-proc Cancellation Tokens
- Assembly Resolution in Azure Functions
- ILogger
- Precompiled functions
- Official Functions C# developer reference
- Contributor Onboarding
- Development Process
- Deploying the Functions runtime as a private site extension
- Authoring & Testing Language Extensions
- Bindings in out-of-proc
- Language Extensibility
- Worker Capabilities
- Investigating and reporting issues with timer triggered functions not firing
- Sharing Your Function App name privately
- Azure Functions CLI release notes [moved here]
- Function App Zipped Deployment [deprecated]