使用Azure CLI,我尝试使用以下命令将环境变量添加到现有的azure容器中:
$ az container create --resource-group toms-cool-group --name my-cool-container --image my-cool-container:v1 --environment-variables 'NumWords'='5' 'MinLength'='8'但我得到了以下错误:
The updates on container group 'receipt-validator' are invalid. If you are going to update the os type, restart policy, network profile, CPU, memory or GPU resources for a container group, you must delete it first and then create a new one.有什么想法吗?
发布于 2019-08-12 02:43:36
为什么不可以,您可以使用命令将环境变量添加到现有的azure容器中,如下所示:
az container create --resource-group toms-cool-group --name my-cool-container --image my-cool-container:v1 --environment-variables 'NumWords'='5' 'MinLength'='8'正如我所看到的,错误显示组‘接收-验证器’与命令toms-cool-group中的组不一样。也许是你犯的错。另外,当您添加环境变量时,区别仅仅是您想要在命令中添加的环境变量,但其他变量是相同的。
我这边的测试:


顺便说一句,实际上,更新只是对蔚蓝容器的重新部署。不同之处在于,重新部署是从上一次部署所缓存的容器映像层中提取的。
https://stackoverflow.com/questions/57443678
复制相似问题