You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

部署Azure容器注册表镜像至Web App后无法运行的问题及解决

问题描述
  • 已通过Azure Pipelines将Docker镜像推送至Azure Container Registry,注册表名为myfirstregistry,镜像名为myfirstimage,标签为"8"(通过命令 az acr repository show-tags -n myfirstregistry --repository myfirstimage 确认)。
  • 执行以下命令部署Azure Web App:
    az webapp create --name my-first-app --resource-group ... --plan ... --deployment-container-image-name myfirstregistry.azurecr.io/myfirstimage:latest
    
  • 在Azure门户的Overview -> Properties -> Web app -> Container Image中,确认显示的镜像为myfirstregistry.azurecr.io/myfirstimage:8,但访问my-first-app.azurewebsites.net时,页面显示“Your web app is running and waiting for your content”,Docker镜像未正常运行。
解决方案

需将startup command设置为Dockerfile中的最后一条命令,本场景为python app.py,可通过以下两种方式配置:

  • Azure门户操作:进入目标Azure Web App,导航至「部署中心」进行设置。
  • 命令行操作:运行以下Azure CLI命令:
    az webapp config show --name my-first-app --resource-group ... --startup-file="python app.py"
    

内容的提问来源于stack exchange,提问作者limitIntegral314

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.25 19:02:48