docker 的 Azure Functions:如何更改端口?

Azure Functions with docker: How change port?

我使用 Spring Native 构建了一个 docker 图像。容器内的 Spring 引导应用程序在端口 80 上侦听,但由于缺少访问权限而在启动时在 Azure Functions 上崩溃(似乎 docker 不允许使用低于 1024 的端口)。如何更改 Azure Functions 用于访问 docker 图像内的应用程序的端口?

如果您使用的是 80 或 8080,azure will auto-detect the used port

每个 other 端口都可以使用 WEBSITES_PORT 环境变量“Function App -> Settings -> Configuration -> New application settings”配置为 8081(或那个应用程序监听的那个)。