Skip to content
Advertisement

Is it possible to have my azure functionapp run on linux?

I’m using an ARM template to create my resources but I can’t quite seem to be able to figure out how to get the actual OS running the function app to be linux.

The reason I want to do this is just so I can properly build native modules. Its pretty common to have a few native modules and so I need to build them in the same version and OS. When I’ve done this in AWS in the past I’ve used docker to create the right version of linux and node to build the modules before a deployment.

Here is my relevant ARM template:

{
    "type": "Microsoft.Web/serverfarms",
    "apiVersion": "2015-04-01",
    "name": "[variables('appname')]",
    "location": "[parameters('location')]",
    "properties": {
        "name": "[variables('appname')]",
        "computeMode": "Dynamic",
        "sku": "Dynamic"
    }
},
{
    "apiVersion": "2015-08-01",
    "type": "Microsoft.Web/sites",
    "name": "[variables('appname')]",
    "location": "[parameters('location')]",
    "kind": "functionapp",
    "dependsOn": [
        "[resourceId('Microsoft.Web/serverfarms', variables('appname'))]",
        "[resourceId('Microsoft.Storage/storageAccounts', variables('storage'))]"
    ],
    "resources": [

    ],
    "properties": {
        "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appname'))]",
        "siteConfig": {
            "appSettings": [
                {
                    "name": "AzureWebJobsDashboard",
                    "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storage'), ';AccountKey=', listKeys(variables('storageid'),'2015-05-01-preview').key1)]"
                },
                {
                    "name": "AzureWebJobsStorage",
                    "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storage'), ';AccountKey=', listKeys(variables('storageid'),'2015-05-01-preview').key1)]"
                },
                {
                    "name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
                    "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storage'), ';AccountKey=', listKeys(variables('storageid'),'2015-05-01-preview').key1)]"
                },
                {
                    "name": "WEBSITE_CONTENTSHARE",
                    "value": "[toLower(variables('appname'))]"
                },
                {
                    "name": "FUNCTIONS_EXTENSION_VERSION",
                    "value": "~1"
                },
                {
                    "name": "WEBSITE_NODE_DEFAULT_VERSION",
                    "value": "8.1.0"
                }
            ]
        }
    }
}

Advertisement

Answer

Function Apps are not currently supported on Linux, though it is something that we are planning to add support for in the future. We do not have an ETA to share yet, but it will happen.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement