Skip to content

Using LinuxFxVersion for Linux Function Apps

divyagandhii edited this page Oct 12, 2020 · 7 revisions

Linux function apps use the 'LinuxFxVersion' config field to specify the host or the language version property for the app.

Language Versions

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'.

Host Versions

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 -

For linux app service/elastic premium apps -

Set LinuxFxVersion to 'DOCKER|mcr.microsoft.com/azure-functions/node:3.0.13142-node10-appservice'.

For linux consumption apps -

Set LinuxFxVersion to 'DOCKER|mcr.microsoft.com/azure-functions/mesh:3.0.13142-node10'.

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.

Learn

Azure Functions Basics

Advanced Concepts

Dotnet Functions

Java Functions

Node.js Functions

Python Functions

Host API's

Bindings

V2 Runtime

Contribute

Functions host

Language workers

Get Help

Other

Clone this wiki locally