我正在按照此页面上的说明在 Azure 容器注册表中创建 Docker 映像。在我进入“运行图像”步骤之前,一切都按预期工作。当我运行命令时:
az acr run --registry {the name of my registry} --cmd '{the name of my registry}.azurecr.io/sample/hello-world:v1" /dev/null
我收到以下错误:
az acr run: error: unrecognized argument: --cmd {the name of my registry}.azurecr.io/sample/hello-world:v1
usage: az acr run [-h] [--verbose] [--debug]
[--output {json,jsonc,table,tsv,yaml,none}]
[--query JMESPATH] --registry REGISTRY_NAME [--file FILE]
[--values VALUES] [--set SET_VALUE]
[--set-secret SET_SECRET] [--no-format] [--no-logs]
[--timeout TIMEOUT] [--resource-group RESOURCE_GROUP_NAME]
[--os OS_TYPE] [--platform PLATFORM]
[--auth-mode {None,Default}] [--no-wait]
[--subscription _SUBSCRIPTION]
<SOURCE_LOCATION>
az acr run 命令似乎不支持文档中指定的 --cmd 参数。
当我运行 az --version 时,我得到以下信息:
azure-cli 2.0.61 *
acr 2.2.3 *
我究竟做错了什么?文档是否正确?我应该使用不同版本的 Azure CLI 吗?