按照 Docker Hub 和 GitHub 上可用的 Azure Functions 运行时 v2 容器定义,我使用以下启动运行时
CMD ["dotnet", "C:\\runtime\\Microsoft.Azure.WebJobs.Script.WebHost.dll"]
访问某些功能时,日志显示“检测到程序集参考更改”并停止主机...
> docker logs {id}
info: Function.GraphQuery[0]
Assembly reference changes detected. Restarting host...
....
info: Host.General[0]
Environment shutdown has been triggered. Stopping host and signaling shutdown.
....
info: Host.General[0]
Stopping Host
info: Host.Startup[0]
Job host stopped
容器不见了:
> docker ps {id}
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
在参考更改后,我需要调整什么以保持容器运行?