gpt4 book ai didi

Azure 容器注册表 (ACR) 运行与 Azure 容器实例 (ACI) 创建

转载 作者:行者123 更新时间:2023-12-02 05:51:53 25 4
gpt4 key购买 nike

在学习 AZ-204 认证时,我发现自己遇到了与两个命令相关的问题。

Azure Container Registry (ACR)

Run the sample/hello-world:v1 container image from your container registry by using the az acr run command

az acr run \
--registry <myContainerRegistry> \
--cmd '$Registry/sample/hello-world:v1' /dev/null

Azure Container Instance (ACI)

Run the following az container create command to start a container instance

az container create \
--resource-group az204-aci-rg \
--name mycontainer \
--image mcr.microsoft.com/azuredocs/aci-helloworld \
--ports 80 \
--dns-name-label $DNS_NAME_LABEL --location <myLocation> \

如果都运行容器,这两个命令有什么区别?

谢谢。

最佳答案

我的理解是,az acr run 将仅执行添加到容器注册表中的镜像的快速运行,提供一些 logging output .

az container create 实际上会创建容器或容器组的运行实例。因此,只要您期望容器服务运行,它就会持续存在。

容器注册表更多的是容器镜像的存储库,而不是容器镜像运行和作为服务提供的地方。在 Azure 容器实例产品中,您可以部署容器组,这些容器组可以从注册表中提取容器镜像,您还可以将镜像提取到其他 Azure 产品中,例如应用服务和 Azure kubernetes 服务。

关于Azure 容器注册表 (ACR) 运行与 Azure 容器实例 (ACI) 创建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72206520/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com