简体   繁体   English

如何停止Azure容器实例?

[英]How do I stop an Azure Container Instance?

I'm still new to the Azure Container Instance scene. 我还是Azure容器实例场景的新手。 I have managed to complete the container instance tutorial. 我已经成功完成了容器实例教程。 However, I've noticed that the tutorial does not show the reader how to stop a running container instance. 但是,我注意到该教程并未向读者展示如何停止正在运行的容器实例。 The nearest command that gaurantees the container instance is indeed stopped / terminated, is by deleting the Resource Group which created the container. 确保容器实例最近的命令实际上已停止/终止,方法是删除创建容器的资源组。

az group delete -n <ResourceGroupNameThatCreatedContainerInstance>

Is this the correct approach? 这是正确的方法吗?

您可以使用z容器删除

az container delete -g MyResourceGroup --name mynginx

The Azure CLI updated and now its possible . Azure CLI已更新,现在可以使用

Stop 停止

az container stop --name
                  --resource-group
                  [--subscription]

Restart 重新开始

az container restart --name
                     --resource-group
                     [--subscription]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 优雅地停止 azure 容器实例 - gracefully stop azure container instance 何时停止或删除 Azure 容器实例 - When to stop OR delete Azure Container Instance 如何使用docker run命令在Azure容器实例中运行Tensorflow服务 - How do I run tensorflow serving in Azure Container Instance with a docker run command Azure 容器实例 FQDN - 我如何在 ARM 中设置它(使用 az create 不起作用) - Azure Container Instance FQDN - how do I set it in the ARM (using az create does not work) 如何使用Azure API启动容器实例? - How can I kick off a container instance using the Azure api? 如何将端口转发应用于 Azure 容器实例? - How can I apply port forwarding to an Azure Container Instance? 如何将文件共享挂载到 azure 容器实例中 - How can I mount a fileshare into an azure container instance 如何使用 Powershell 命令或 ARM 命令启动停止 azure 容器实例 - How to start stop azure container instance using Powershell command or ARM command Azure - 如何使用 Container Registry 将 Docker 执行到容器中? - Azure - how do I Docker exec into container with a Container Registry? 停止或删除后,Azure容器实例显然保持运行 - Azure Container Instance apparently keeps running after Stop or Delete
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM