是否有可能让我的azure functionapp在linux上运行?

时间:2017-10-12 05:36:47

标签: linux azure azure-functions

我正在使用ARM模板来创建我的资源,但我似乎无法弄清楚如何让运行该功能应用程序的实际操作系统成为linux。

我想这样做的原因是我可以正确构建本机模块。有一些原生模块很常见,所以我需要在相同的版本和操作系统中构建它们。过去我在AWS中完成此操作时,我已经使用docker创建了正确版本的linux和节点,以便在部署之前构建模块。

这是我的相关ARM模板:

{
    "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"
                }
            ]
        }
    }
}

1 个答案:

答案 0 :(得分:2)

Linux目前不支持功能应用程序,但我们计划在未来添加支持。我们尚未分享ETA,但它会发生。