【问题标题】:Upgrading Node.js version on an Azure Linux Web App?在 Azure Linux Web 应用程序上升级 Node.js 版本?
【发布时间】:2017-07-24 00:39:40
【问题描述】:

我刚刚通过此链接创建了一个 Azure Linux Web 应用程序(预览版):

我开发了一个koajs 后端,需要节点 v7.6.0 或更高版本。

我也读过这篇 SO 帖子:Upgrading Node on an Azure website?,但它与使用 iis_node 的 Azure Windows Web App 有关。

到目前为止,我尝试从 bash kudu 控制台安装nvm
https://{mysitename}.scm.azurewebsites.net/DebugConsole
但它没有工作

所以现在我的猜测是,当我从 azure 门户中选择 Node.js 版本时,Azure 会选择一个特定的内置 docker 映像。因为没有适用于 Node.js v7.6.0 或更高版本的图像,我需要创建自己的图像?

是否可以从门户网站获取 node.js 的最新 docker 映像配置,还是我需要从头开始创建一个?

【问题讨论】:

    标签: node.js linux azure-web-app-service


    【解决方案1】:

    Linux 上的 Azure WebApp 是一个 Docker 容器,根据官方文档 Using a custom Docker image for Azure Web App on Linux,您可以设置自定义 Docker 镜像,其中包含用于 Web 应用的 Node.js 更高版本或使用来自@987654322 的节点官方更高版本镜像@。

    希望对你有帮助。

    【讨论】:

    • 非常感谢,我要试试这个 ;-)
    【解决方案2】:

    目前,Linux 平台上可用的 Node.js 版本为:4.4.7, 4.5.0, 6.2.2, 6.6.0, 6.9.3, 6.10.3。我建议您改用 Azure Windows Web App,它使您能够将 Node.js 运行时升级到 v7.6.0 或更高版本 (7.7.4, 8.0.0, 8.1.4)。

    【讨论】:

    • 是的,这是个好方法,但我只是想测试 Linux webapp :-)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-29
    相关资源
    最近更新 更多