Azure Container Group Instance

牧云@^-^@ 提交于 2021-02-19 05:22:51

问题


I am working with Azure Container Instance group.. and one of my containers is constantly restarting.. it goes to a terminated state and restarts. Everything looks good in logs.. The container is running a spring framework + React application. When I run the containers locally.. it works perfectly.

Am not sure what is happening behind the scenes?


回答1:


You could use Azure CLI to set a restart policy of OnFailure or Never.

az container create \
    --resource-group myResourceGroup \
    --name mycontainer \
    --image mycontainerimage \
    --restart-policy OnFailure

If you specify the restart policy and the issue still exists,there might be some problems with the application or script executed in your container. You could use az container show command to check the restartCount property.

az container show --name
                  --resource-group

For more details, refer to this article.



来源:https://stackoverflow.com/questions/49544077/azure-container-group-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!