az acr
Note
此命令组具有在 Azure CLI 和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 Learn more about extensions.
使用 Azure 容器注册表管理专用注册表。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az acr agentpool |
使用 Azure 容器注册表管理专用任务代理池。 |
Core | Preview |
az acr agentpool create |
为 Azure 容器注册表创建代理池。 |
Core | Preview |
az acr agentpool delete |
删除代理池。 |
Core | Preview |
az acr agentpool list |
列出 Azure 容器注册表的代理池。 |
Core | Preview |
az acr agentpool show |
获取 Azure 容器注册表的指定代理池的属性。 |
Core | Preview |
az acr agentpool update |
更新 Azure 容器注册表的代理池。 |
Core | Preview |
az acr artifact-streaming |
管理 ACR 中任何存储库或支持的映像的项目流式处理。 |
Core | Preview |
az acr artifact-streaming create |
为 ACR 中的特定映像创建引用者流项目。 |
Core | Preview |
az acr artifact-streaming operation |
管理 ACR 的流项目创建操作。 |
Core | Preview |
az acr artifact-streaming operation cancel |
取消 ACR 的给定流项目操作。 |
Core | Preview |
az acr artifact-streaming operation show |
检查 ACR 中项目流式处理的操作状态。 |
Core | Preview |
az acr artifact-streaming show |
显示是否在 Azure 容器注册表的存储库中启用了项目流式处理。 |
Core | Preview |
az acr artifact-streaming update |
为给定注册表下新推送的映像启用或禁用自动创建流项目。 |
Core | Preview |
az acr build |
对快速生成进行排队,为 Azure 容器注册表提供流式处理日志。 |
Core | GA |
az acr cache |
管理 Azure 容器注册表中的缓存规则。 |
Core | GA |
az acr cache create |
创建缓存规则。 |
Core | GA |
az acr cache delete |
删除缓存规则。 |
Core | GA |
az acr cache list |
列出 Azure 容器注册表中的缓存规则。 |
Core | GA |
az acr cache show |
显示缓存规则。 |
Core | GA |
az acr cache update |
更新缓存规则上的凭据集。 |
Core | GA |
az acr check-health |
获取环境中的运行状况信息以及目标注册表(可选)。 |
Core | GA |
az acr check-name |
检查 Azure 容器注册表名称是否有效且可供使用。 |
Core | GA |
az acr config |
为 Azure 容器注册表配置策略。 |
Core | GA |
az acr config authentication-as-arm |
管理 Azure 容器注册表的“Azure AD 身份验证为 ARM”策略。 |
Core | Preview |
az acr config authentication-as-arm show |
为 Azure 容器注册表显示配置的“Azure AD 身份验证为 ARM”策略。 |
Core | Preview |
az acr config authentication-as-arm update |
更新 Azure 容器注册表的“Azure AD 身份验证为 ARM”策略。 |
Core | Preview |
az acr config content-trust |
管理 Azure 容器注册表的内容信任策略。 |
Core | GA |
az acr config content-trust show |
显示 Azure 容器注册表配置的内容信任策略。 |
Core | GA |
az acr config content-trust update |
更新 Azure 容器注册表的内容信任策略。 |
Core | GA |
az acr config retention |
管理 Azure 容器注册表的保留策略。 |
Core | Preview |
az acr config retention show |
显示 Azure 容器注册表配置的保留策略。 |
Core | Preview |
az acr config retention update |
更新 Azure 容器注册表的保留策略。 |
Core | Preview |
az acr config soft-delete |
管理 Azure 容器注册表的软删除策略。 |
Core | Preview |
az acr config soft-delete show |
显示 Azure 容器注册表配置的软删除策略。 |
Core | Preview |
az acr config soft-delete update |
更新 Azure 容器注册表的软删除策略。 |
Core | Preview |
az acr connected-registry |
使用 Azure 容器注册表管理连接的注册表资源。 |
Core | GA |
az acr connected-registry create |
为 Azure 容器注册表创建连接的注册表。 |
Core | GA |
az acr connected-registry deactivate |
从 Azure 容器注册表停用连接的注册表。 |
Core | GA |
az acr connected-registry delete |
从 Azure 容器注册表中删除连接的注册表。 |
Core | GA |
az acr connected-registry get-settings |
检索激活连接注册表所需的信息,并创建或轮换同步令牌凭据。 |
Core | GA |
az acr connected-registry list |
列出当前父注册表下的所有已连接注册表。 |
Core | GA |
az acr connected-registry list-client-tokens |
列出与特定连接的注册表关联的所有客户端令牌。 |
Core | GA |
az acr connected-registry permissions |
跨多个连接的注册表管理存储库权限。 有关详细信息,请参阅 https://aka.ms/acr/connected-registry。 |
Core | GA |
az acr connected-registry permissions show |
显示连接的注册表同步范围映射信息。 |
Core | GA |
az acr connected-registry permissions update |
跨所有必需的连接注册表同步范围映射添加和删除存储库权限。 |
Core | GA |
az acr connected-registry show |
显示连接的注册表详细信息。 |
Core | GA |
az acr connected-registry update |
更新 Azure 容器注册表的连接注册表。 |
Core | GA |
az acr create |
创建 Azure 容器注册表。 |
Core | GA |
az acr credential |
管理 Azure 容器注册表的登录凭据。 |
Core | GA |
az acr credential-set |
管理 Azure 容器注册表中的凭据集。 |
Core | GA |
az acr credential-set create |
创建凭据集。 |
Core | GA |
az acr credential-set delete |
删除凭据集。 |
Core | GA |
az acr credential-set list |
列出 Azure 容器注册表中的凭据集。 |
Core | GA |
az acr credential-set show |
显示凭据集。 |
Core | GA |
az acr credential-set update |
更新凭据集上的用户名或密码 Azure Key Vault 机密 ID。 |
Core | GA |
az acr credential renew |
重新生成 Azure 容器注册表的登录凭据。 |
Core | GA |
az acr credential show |
获取 Azure 容器注册表的登录凭据。 |
Core | GA |
az acr delete |
删除 Azure 容器注册表。 |
Core | GA |
az acr encryption |
管理容器注册表加密。 |
Core | GA |
az acr encryption rotate-key |
轮换容器注册表的加密密钥(更新)。 |
Core | GA |
az acr encryption show |
显示容器注册表的加密详细信息。 |
Core | GA |
az acr export-pipeline |
管理 ACR 导出管道。 |
Extension | Preview |
az acr export-pipeline create |
创建导出管道。 |
Extension | Preview |
az acr export-pipeline delete |
删除导出管道。 |
Extension | Preview |
az acr export-pipeline list |
列出容器注册表上的导出管道。 |
Extension | Preview |
az acr export-pipeline show |
详细显示导出管道。 |
Extension | Preview |
az acr helm |
管理 Azure 容器注册表的 helm 图表。 |
Core | Deprecated |
az acr helm delete |
删除 Azure 容器注册表中的 helm 图表版本。 |
Core | Deprecated |
az acr helm install-cli |
下载并安装 Helm 命令行工具。 |
Core | 预览和弃用 |
az acr helm list |
列出 Azure 容器注册表中的所有 helm 图表。 |
Core | Deprecated |
az acr helm push |
将 helm 图表包推送到 Azure 容器注册表。 |
Core | Deprecated |
az acr helm repo |
管理 Azure 容器注册表的 helm 图表存储库。 |
Core | Deprecated |
az acr helm repo add |
通过 Helm CLI 从 Azure 容器注册表添加 helm 图表存储库。 |
Core | Deprecated |
az acr helm show |
描述 Azure 容器注册表中的 helm 图表。 |
Core | Deprecated |
az acr identity |
管理容器注册表的服务(托管)标识。 |
Core | GA |
az acr identity assign |
将托管标识分配给容器注册表。 |
Core | GA |
az acr identity remove |
从容器注册表中删除托管标识。 |
Core | GA |
az acr identity show |
显示容器注册表的标识详细信息。 |
Core | GA |
az acr import |
将映像从另一个容器注册表导入到 Azure 容器注册表。 导入不再需要 docker 拉取、docker 标记、docker 推送。 对于较大的图像,请考虑使用 |
Core | GA |
az acr import-pipeline |
管理 ACR 导入管道。 |
Extension | Preview |
az acr import-pipeline create |
创建导入管道。 |
Extension | Preview |
az acr import-pipeline delete |
删除导入管道。 |
Extension | Preview |
az acr import-pipeline list |
列出容器注册表上的导入管道。 |
Extension | Preview |
az acr import-pipeline show |
详细显示导入管道。 |
Extension | Preview |
az acr list |
列出当前订阅下的所有容器注册表。 |
Core | GA |
az acr login |
通过 Docker CLI 登录到 Azure 容器注册表。 |
Core | GA |
az acr manifest |
管理 Azure 容器注册表中的项目清单。 |
Core | Preview |
az acr manifest delete |
删除 Azure 容器注册表中的清单。 |
Core | Preview |
az acr manifest list |
列出 Azure 容器注册表中存储库中的清单。 |
Core | Preview |
az acr manifest list-deleted |
列出 Azure 容器注册表中存储库中的软删除清单。 |
Core | Preview |
az acr manifest list-deleted-tags |
列出 Azure 容器注册表中存储库中的软删除标记。 |
Core | Preview |
az acr manifest list-metadata |
列出 Azure 容器注册表中存储库中清单的元数据。 |
Core | Preview |
az acr manifest list-referrers |
列出 Azure 容器注册表中清单的引用者。 |
Core | Preview |
az acr manifest restore |
还原 Azure 容器注册表中的软删除项目和标记。 |
Core | Preview |
az acr manifest show |
获取 Azure 容器注册表中的清单。 |
Core | Preview |
az acr manifest show-metadata |
获取 Azure 容器注册表中项目元数据。 |
Core | Preview |
az acr manifest update-metadata |
更新 Azure 容器注册表中项目的清单元数据。 |
Core | Preview |
az acr network-rule |
管理 Azure 容器注册表的网络规则。 |
Core | GA |
az acr network-rule add |
添加网络规则。 |
Core | GA |
az acr network-rule list |
列出网络规则。 |
Core | GA |
az acr network-rule remove |
删除网络规则。 |
Core | GA |
az acr pack |
管理使用云本机 Buildpack 的 Azure 容器注册表任务。 |
Core | Preview |
az acr pack build |
将生成应用并将其推送到 Azure 容器注册表的快速生成任务排队。 |
Core | Preview |
az acr pipeline-run |
管理 ACR 导入和导出管道运行。 |
Extension | Preview |
az acr pipeline-run clean |
删除注册表上所有失败的管道运行。 |
Extension | Preview |
az acr pipeline-run create |
创建管道运行。 |
Extension | Preview |
az acr pipeline-run delete |
删除管道运行。 |
Extension | Preview |
az acr pipeline-run list |
列出容器注册表上所有管道的管道运行。 |
Extension | Preview |
az acr pipeline-run show |
详细显示管道运行。 |
Extension | Preview |
az acr private-endpoint-connection |
管理容器注册表专用终结点连接。 |
Core | GA |
az acr private-endpoint-connection approve |
批准容器注册表的专用终结点连接请求。 |
Core | GA |
az acr private-endpoint-connection delete |
删除容器注册表的专用终结点连接请求。 |
Core | GA |
az acr private-endpoint-connection list |
列出与容器注册表的所有专用终结点连接。 |
Core | GA |
az acr private-endpoint-connection reject |
拒绝容器注册表的专用终结点连接请求。 |
Core | GA |
az acr private-endpoint-connection show |
显示容器注册表的专用终结点连接的详细信息。 |
Core | GA |
az acr private-link-resource |
管理注册表专用链接资源。 |
Core | GA |
az acr private-link-resource list |
列出注册表支持的专用链接资源。 |
Core | GA |
az acr query |
使用 Kusto 查询语言查询 ACR 中的内容。 |
Extension | GA |
az acr replication |
管理 Azure 容器注册表的异地复制区域。 |
Core | GA |
az acr replication create |
为 Azure 容器注册表创建复制区域。 |
Core | GA |
az acr replication delete |
从 Azure 容器注册表中删除复制的区域。 |
Core | GA |
az acr replication list |
列出异地复制的 Azure 容器注册表的所有区域。 |
Core | GA |
az acr replication show |
获取复制区域的详细信息。 |
Core | GA |
az acr replication update |
更新复制。 |
Core | GA |
az acr repository |
管理 Azure 容器注册表的存储库(映像名称)。 |
Core | GA |
az acr repository delete |
删除 Azure 容器注册表中的存储库或映像。 |
Core | GA |
az acr repository list |
列出 Azure 容器注册表中的存储库。 |
Core | GA |
az acr repository list-deleted |
列出 Azure 容器注册表中的软删除存储库。 |
Core | Preview |
az acr repository show |
获取 Azure 容器注册表中存储库或映像的属性。 |
Core | GA |
az acr repository show-tags |
在 Azure 容器注册表中显示存储库的标记。 |
Core | GA |
az acr repository untag |
在 Azure 容器注册表中取消标记映像。 |
Core | GA |
az acr repository update |
更新 Azure 容器注册表中存储库或映像的属性。 |
Core | GA |
az acr run |
对提供 Azure 容器注册表流式传输日志的快速运行进行排队。 |
Core | GA |
az acr scope-map |
管理 Azure 容器注册表的范围访问映射。 |
Core | GA |
az acr scope-map create |
为 Azure 容器注册表创建范围映射。 |
Core | GA |
az acr scope-map delete |
删除 Azure 容器注册表的范围映射。 |
Core | GA |
az acr scope-map list |
列出 Azure 容器注册表的所有范围映射。 |
Core | GA |
az acr scope-map show |
显示 Azure 容器注册表的范围映射的详细信息和属性。 |
Core | GA |
az acr scope-map update |
更新 Azure 容器注册表的范围映射。 |
Core | GA |
az acr show |
获取 Azure 容器注册表的详细信息。 |
Core | GA |
az acr show-endpoints |
显示注册表终结点。 |
Core | GA |
az acr show-usage |
获取 Azure 容器注册表的存储使用情况。 |
Core | GA |
az acr supply-chain |
用于管理 acr 供应链资源的命令。 |
Extension | Preview |
az acr supply-chain workflow |
用于管理 acr 供应链工作流的命令。 |
Extension | Preview |
az acr supply-chain workflow cancel-run |
取消当前正在运行的供应链工作流。 |
Extension | Preview |
az acr supply-chain workflow create |
创建 acr 供应链工作流。 |
Extension | Preview |
az acr supply-chain workflow delete |
删除 acr 供应链工作流。 |
Extension | Preview |
az acr supply-chain workflow list |
列出 acr 供应链工作流映像的状态。 |
Extension | Preview |
az acr supply-chain workflow show |
显示 acr 供应链工作流任务。 |
Extension | Preview |
az acr supply-chain workflow update |
更新 acr 供应链工作流。 |
Extension | Preview |
az acr task |
使用 Azure 容器注册表管理生成、测试和 OS & 框架修补容器映像的步骤集合。 |
Core | GA |
az acr task cancel-run |
取消指定的 Azure 容器注册表运行。 |
Core | GA |
az acr task create |
创建用于生成、测试和 OS & 框架修补容器的一系列步骤。 任务支持 git 提交和基础映像更新中的触发器。 |
Core | GA |
az acr task credential |
管理任务的凭据。 有关详细信息,请参阅 https://aka.ms/acr/tasks/cross-registry-authentication。 |
Core | GA |
az acr task credential add |
将自定义注册表登录凭据添加到任务。 |
Core | GA |
az acr task credential list |
列出任务的所有自定义注册表凭据。 |
Core | GA |
az acr task credential remove |
删除任务的凭据。 |
Core | GA |
az acr task credential update |
更新任务的注册表登录凭据。 |
Core | GA |
az acr task delete |
从 Azure 容器注册表中删除任务。 |
Core | GA |
az acr task identity |
任务的托管标识。 有关详细信息,请参阅 https://aka.ms/acr/tasks/task-create-managed-identity。 |
Core | GA |
az acr task identity assign |
更新任务的托管标识。 |
Core | GA |
az acr task identity remove |
删除任务的托管标识。 |
Core | GA |
az acr task identity show |
显示任务的托管标识。 |
Core | GA |
az acr task list |
列出 Azure 容器注册表的任务。 |
Core | GA |
az acr task list-runs |
列出 Azure 容器注册表的所有已执行运行,并能够按特定任务进行筛选。 |
Core | GA |
az acr task logs |
显示特定运行的日志。 如果未提供运行 ID,则显示上次创建的运行的日志。 |
Core | GA |
az acr task run |
手动触发可能正在等待 git 提交或基础映像更新触发器的任务。 |
Core | GA |
az acr task show |
获取 Azure 容器注册表的命名任务的属性。 |
Core | GA |
az acr task show-run |
获取 Azure 容器注册表任务的指定运行的属性。 |
Core | GA |
az acr task timer |
管理任务的计时器触发器。 |
Core | GA |
az acr task timer add |
将计时器触发器添加到任务。 |
Core | GA |
az acr task timer list |
列出任务的所有计时器触发器。 |
Core | GA |
az acr task timer remove |
从任务中删除计时器触发器。 |
Core | GA |
az acr task timer update |
更新任务的计时器触发器。 |
Core | GA |
az acr task update |
更新 Azure 容器注册表的任务。 |
Core | GA |
az acr task update-run |
修补 Azure 容器注册表任务的运行属性。 |
Core | GA |
az acr taskrun |
使用 Azure 容器注册表管理任务运行。 |
Core | Preview |
az acr taskrun delete |
从 Azure 容器注册表中删除任务运行。 |
Core | Preview |
az acr taskrun list |
列出 Azure 容器注册表的任务运行。 |
Core | Preview |
az acr taskrun logs |
显示特定任务运行的运行日志。 |
Core | Preview |
az acr taskrun show |
获取 Azure 容器注册表的命名任务运行的属性。 |
Core | Preview |
az acr token |
管理 Azure 容器注册表的令牌。 |
Core | GA |
az acr token create |
创建与 Azure 容器注册表的范围映射关联的令牌。 |
Core | GA |
az acr token credential |
管理 Azure 容器注册表令牌的凭据。 |
Core | GA |
az acr token credential delete |
删除令牌凭据。 |
Core | GA |
az acr token credential generate |
为 Azure 容器注册表生成或替换令牌的一个或两个密码。 有关使用令牌和密码访问容器注册表,请参阅 https://aka.ms/acr/repo-permissions。 |
Core | GA |
az acr token delete |
删除 Azure 容器注册表的令牌。 |
Core | GA |
az acr token list |
列出 Azure 容器注册表的所有令牌。 |
Core | GA |
az acr token show |
显示 Azure 容器注册表令牌的详细信息和属性。 |
Core | GA |
az acr token update |
更新 Azure 容器注册表的令牌(替换关联的范围映射)。 |
Core | GA |
az acr update |
更新 Azure 容器注册表。 |
Core | GA |
az acr webhook |
管理 Azure 容器注册表的 Webhook。 |
Core | GA |
az acr webhook create |
为 Azure 容器注册表创建 Webhook。 |
Core | GA |
az acr webhook delete |
从 Azure 容器注册表中删除 Webhook。 |
Core | GA |
az acr webhook get-config |
获取 Webhook 的服务 URI 和自定义标头。 |
Core | GA |
az acr webhook list |
列出 Azure 容器注册表的所有 Webhook。 |
Core | GA |
az acr webhook list-events |
列出 Webhook 的最新事件。 |
Core | GA |
az acr webhook ping |
为 Webhook 触发 ping 事件。 |
Core | GA |
az acr webhook show |
获取 Webhook 的详细信息。 |
Core | GA |
az acr webhook update |
更新 Webhook。 |
Core | GA |
az acr build
对快速生成进行排队,为 Azure 容器注册表提供流式处理日志。
az acr build --registry
[--agent-pool]
[--auth-mode {Default, None}]
[--build-arg]
[--file]
[--image]
[--log-template]
[--no-format]
[--no-logs]
[--no-push]
[--no-wait]
[--platform]
[--resource-group]
[--secret-build-arg]
[--source-acr-auth-id {[caller], none}]
[--target]
[--timeout]
[]
示例
将本地上下文作为 Linux 生成排队,对其进行标记,并将其推送到注册表。
az acr build -t sample/hello-world:{{.Run.ID}} -r myregistry .
将本地上下文作为 Linux 生成排队,对其进行标记,并在不流式处理日志的情况下将其推送到注册表。
az acr build -t sample/hello-world:{{.Run.ID}} -r myregistry --no-logs .
将本地上下文作为 Linux 生成排队,而不将其推送到注册表。
az acr build -t sample/hello-world:{{.Run.ID}} -r myregistry --no-push .
将本地上下文作为 Linux 生成排队,而不将其推送到注册表。
az acr build -r myregistry .
将远程 GitHub 上下文作为 Windows 生成排队,对其进行标记,并将其推送到注册表。
az acr build -r myregistry https://github.com/Azure/acr-builder.git -f Windows.Dockerfile --platform windows
将远程 OCI 项目上下文生成排队。
az acr build -r myregistry oci://myregistry.azurecr.io/myartifact:mytag
在 arm/v7 体系结构上将本地上下文作为 Linux 版本排队,对其进行标记,并将其推送到注册表。
az acr build -t sample/hello-world:{{.Run.ID}} -r myregistry . --platform linux/arm/v7
将本地上下文作为 Linux 生成排队,对其进行标记,并将其推送到已启用 ABAC 的存储库权限注册表,并使用调用方的 Entra 标识向源注册表进行身份验证。
az acr build -t sample/hello-world:{{.Run.ID}} -r myregistry . --source-acr-auth-id [caller]
必需参数
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
代理池的名称。
源注册表的身份验证模式。
属性 | 值 |
---|---|
接受的值: | Default, None |
“--build-arg name[=value]”格式的生成参数。 多次传递“--build-arg name[=value]”支持倍数。 重要说明:此参数不应包含任何类型的密码、访问令牌或敏感信息。 出于调试目的,ACR 团队将显示此参数值。
docker 文件的相对路径,指向源代码根文件夹。 默认为“Dockerfile”。
图像的名称和标记,格式为:“-t 存储库/image:tag”。 通过多次传递 -t 支持多个标记。
使用“log/repo:tag”格式(例如“acr/logs:{{.Run.ID}}”)运行日志项目的存储库和标记模板。 仅适用于已启用 CMK 的注册表。
指示日志是否应以原始格式显示。
属性 | 值 |
---|---|
默认值: | False |
成功排队生成后,不显示日志。
属性 | 值 |
---|---|
默认值: | False |
指示是否应将生成的映像推送到注册表。
属性 | 值 |
---|---|
默认值: | False |
不要等待生成完成,并在排队生成后立即返回。
属性 | 值 |
---|---|
默认值: | False |
运行生成/任务的平台,例如“windows”和“linux”。 在生成命令中使用时,还可以在生成的图像的“os/arch/variant”格式中指定它。 Eg, linux/arm/v7. “arch”和“variant”部分是可选的。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
“--secret-build-arg name[=value]”格式的机密生成参数。 多次传递“--secret-build-arg name[=value]”支持倍数。 此参数值不会浮出 ACR 团队,更适合敏感信息。
分配用于源注册表登录的标识。 对调用方标识使用“[调用方]”。
属性 | 值 |
---|---|
接受的值: | [caller], none |
目标生成阶段的名称。
超时(以秒为单位)。
本地源代码目录路径(例如,“./src”)或 git 存储库(例如,“https://github.com/Azure-Samples/acr-build-helloworld-node.git”)或远程 tarball(例如,“http://server/context.tar.gz”)或 Azure 容器注册表中 OCI 项目的存储库(例如,“oci://myregistry.azurecr.io/myartifact:mytag”)。
属性 | 值 |
---|---|
Parameter group: | Positional |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr check-health
获取环境中的运行状况信息以及目标注册表(可选)。
az acr check-health [--ignore-errors]
[--name]
[--repository]
[--vnet]
[--yes]
示例
获取目标注册表“myregistry”的运行状况状态,跳过请求映像的确认。
az acr check-health -n myregistry -y
获取环境的运行状况状态,而不会在第一次错误时停止。
az acr check-health --ignore-errors
获取目标注册表“myregistry”的运行状况状态,并检查特定存储库“myrepo”的允许权限。
az acr check-health -n myregistry --repository myrepo
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
提供所有运行状况检查,即使发现错误。
属性 | 值 |
---|---|
默认值: | False |
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
存储库的名称。
虚拟网络 ID,以便在 VNET 中运行此命令,以验证 DNS 路由到专用终结点。
不要提示确认。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr check-name
检查 Azure 容器注册表名称是否有效且可供使用。
az acr check-name --name
[--dnl-scope {NoReuse, ResourceGroupReuse, SubscriptionReuse, TenantReuse, Unsecure}]
[--resource-group]
示例
检查注册表名称是否已存在。
az acr check-name -n doesthisnameexist
必需参数
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Domain name label 范围将向资源名称添加哈希值。 生成的登录服务器名称将采用 .azurecr-io 格式 registry-name
-hash
。 默认值为 Unsecure。
属性 | 值 |
---|---|
默认值: | Unsecure |
接受的值: | NoReuse, ResourceGroupReuse, SubscriptionReuse, TenantReuse, Unsecure |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr create
创建 Azure 容器注册表。
az acr create --name
--resource-group
--sku {Basic, Premium, Standard}
[--admin-enabled {false, true}]
[--allow-exports {false, true}]
[--allow-metadata-search {false, true}]
[--allow-trusted-services {false, true}]
[--default-action {Allow, Deny}]
[--dnl-scope {NoReuse, ResourceGroupReuse, SubscriptionReuse, TenantReuse, Unsecure}]
[--identity]
[--key-encryption-key]
[--location]
[--public-network-enabled {false, true}]
[--role-assignment-mode {rbac, rbac-abac}]
[--tags]
[--workspace]
[--zone-redundancy {Disabled, Enabled}]
示例
使用标准 SKU 创建托管容器注册表。
az acr create -n myregistry -g MyResourceGroup --sku Standard
创建启用了 ABAC 的存储库权限的注册表。
az acr create -n myregistry -g MyResourceGroup --sku Standard --role-assignment-mode rbac-abac
必需参数
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
容器注册表的 SKU。
属性 | 值 |
---|---|
接受的值: | Basic, Premium, Standard |
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
指示是否启用管理员用户。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
配置 exportPolicy 以允许/禁止从此注册表导出项目。 可以通过导入或传输操作导出项目。 有关详细信息,请访问 https://aka.ms/acr/export-policy。
属性 | 值 |
---|---|
接受的值: | false, true |
启用或禁用注册表的元数据搜索功能。 如果未指定,则默认设置为禁用。
属性 | 值 |
---|---|
接受的值: | false, true |
允许受信任的 Azure 服务访问网络受限注册表。 有关详细信息,请访问 https://aka.ms/acr/trusted-services。 默认值是允许的。
属性 | 值 |
---|---|
Parameter group: | Network Rule Arguments |
接受的值: | false, true |
如果未匹配规则,则应用的默认操作。 仅适用于高级 SKU。
属性 | 值 |
---|---|
Parameter group: | Network Rule Arguments |
接受的值: | Allow, Deny |
Domain name label 范围会给资源名称添加一个哈希值。 生成的登录服务器名称将采用 .azurecr-io 格式 registryname
-hash
。 默认值为 Unsecure。
属性 | 值 |
---|---|
接受的值: | NoReuse, ResourceGroupReuse, SubscriptionReuse, TenantReuse, Unsecure |
如果在同一资源组中,请使用分配的托管标识资源 ID 或名称。
属性 | 值 |
---|---|
Parameter group: | Customer managed key Arguments |
密钥保管库密钥 URI。 若要启用自动轮换,请提供无版本密钥 URI。 对于手动轮换,请提供版本控制密钥 URI。
属性 | 值 |
---|---|
Parameter group: | Customer managed key Arguments |
Location.
az account list-locations
中的值。 可以使用 az configure --defaults location=<location>
配置默认位置。
允许对容器注册表进行公用网络访问。 默认值是允许的。
属性 | 值 |
---|---|
Parameter group: | Network Rule Arguments |
接受的值: | false, true |
注册表的角色分配模式。 有关此功能的详细信息,请参阅 https://aka.ms/acr/auth/abac。 默认值为 rbac。
属性 | 值 |
---|---|
Parameter group: | Permissions and Role Assignment Arguments |
接受的值: | rbac, rbac-abac |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
要向其发送注册表诊断日志的 Log Analytics 工作区的名称或 ID。 将启用所有事件。 可以使用“az monitor log-analytics workspace create”创建一个。 可能会应用额外的计费。
指示是否应为此注册表或复制启用区域冗余。 有关详细信息(如支持的位置),请访问 https://aka.ms/acr/az。 区域冗余无法更新。 默认值为“Disabled”。
属性 | 值 |
---|---|
接受的值: | Disabled, Enabled |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr delete
删除 Azure 容器注册表。
az acr delete --name
[--resource-group]
[--yes]
示例
删除 Azure 容器注册表。
az acr delete -n myregistry
必需参数
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
不要提示确认。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr import
将映像从另一个容器注册表导入到 Azure 容器注册表。 导入不再需要 docker 拉取、docker 标记、docker 推送。 对于较大的图像,请考虑使用 --no-wait
。
az acr import --name
--source
[--force]
[--image]
[--no-wait]
[--password]
[--registry]
[--repository]
[--resource-group]
[--username]
示例
将图像从“sourceregistry”导入到“myregistry”。 映像继承其源存储库和标记名称。
az acr import -n myregistry --source sourceregistry.azurecr.io/sourcerepository:sourcetag
从 Docker 中心上的公共存储库导入映像。 映像使用指定的存储库和标记名称。
az acr import -n myregistry --source docker.io/library/hello-world:latest -t targetrepository:targettag
使用专用存储库的用户名和密码从专用存储库导入映像。 这也适用于 Azure 外部的注册表。
az acr import -n myregistry --source myprivateregistry.azurecr.io/hello-world:latest -u username -p password
从其他订阅中的 Azure 容器注册表导入映像。
az acr import -n myregistry --source sourcerepository:sourcetag -t targetrepository:targettag \
-r /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry
导入映像,而无需等待成功完成。 导入期间失败不会反映。 运行“az acr repository show-tags”以确认导入成功。
az acr import -n myregistry --source sourceregistry.azurecr.io/sourcerepository:sourcetag --no-wait
必需参数
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
包含注册表登录服务器的源映像名称或完全限定的源。 如果使用 --registry
,--source
将始终解释为源映像,即使它包含登录服务器也是如此。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
覆盖要导入的映像的现有标记。
属性 | 值 |
---|---|
默认值: | False |
图像的名称和标记,格式为:“-t 存储库/image:tag”。 通过多次传递 -t 支持多个标记。
不要等待导入完成,并在排队导入后立即返回。
属性 | 值 |
---|---|
默认值: | False |
源容器注册表的密码。
源 Azure 容器注册表。 这可以是源注册表的名称、登录服务器或资源 ID。
仅清单映像副本的存储库名称。 通过多次传递 --repository 支持多个副本。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
源容器注册表的用户名。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr list
列出当前订阅下的所有容器注册表。
az acr list [--resource-group]
示例
列出容器注册表,并在表中跨多个资源组显示结果。
az acr list -o table
列出资源组中的容器注册表,并在表中显示结果。
az acr list -g MyResourceGroup -o table
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr login
通过 Docker CLI 登录到 Azure 容器注册表。
必须在计算机上安装 Docker。 完成后,用于 docker logout <registry url>
注销。(如果只需要刷新令牌,并且不想安装 Docker,请指定“--expose-token”。
az acr login --name
[--expose-token]
[--password]
[--resource-group]
[--suffix]
[--username]
示例
登录到 Azure 容器注册表
az acr login -n myregistry
获取 Azure 容器注册表访问令牌
az acr login -n myregistry --expose-token
必需参数
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
公开刷新令牌,而不是通过 Docker CLI 自动登录。
属性 | 值 |
---|---|
默认值: | False |
用于登录到容器注册表的密码。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
注册表登录服务器中的租户后缀。 如果注册表登录服务器的格式为“registry-tenant.azurecr.io”,则可以指定“--suffix tenant”。 如果从其他订阅访问注册表,或者你有权访问映像,但无权管理注册表资源,则适用。
用于登录到容器注册表的用户名。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr query
使用 Kusto 查询语言查询 ACR 中的内容。
使用 Kusto 查询语言查询 Azure 容器注册表中的项目和映像。 OCI 清单属性(如摘要、主题、批注等)可用于查询、筛选和排序搜索结果。
az acr query --kql-query
--name
[--password]
[--repository]
[--skip-token]
[--username]
示例
提取单个清单
az acr query -n $MyRegistry -q "Manifests | limit 1"
对存储库中的所有清单进行计数$RepositoryName
az acr query -n $MyRegistry -q "Manifests" -o table
按创建日期的顺序列出存储库$RepositoryName中的所有清单
az acr query -n $MyRegistry --repository $RepositoryName -q "Manifests | order by createdAt desc"
查询存储库中由$Signature签名的所有摘要$RepositoryName
az acr query -n $MyRegistry --repository $RepositoryName -q "Manifests | where annotations['org.cncf.notary.signature.subject'] == $Signature | project createdAt, digest, subject"
使用跳过令牌查询注册表中的摘要并按摘要进行排序(对于分页结果)
az acr query -n $MyRegistry -q "Manifests | project digest | order by digest asc" --skip-token eyAibm8iOiAibHVjayIsICJidXQiOiAibmljZSIsICJ0cnkiOiAiISIgfQ==
必需参数
要执行的 KQL 查询。
要对其运行查询的容器注册表的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Registry password.
要对其运行查询的存储库。 如果未提供存储库,则查询在注册表级别运行。
跳过令牌以获取查询的下一页(如果适用)。
Registry username.
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr run
对提供 Azure 容器注册表流式传输日志的快速运行进行排队。
az acr run --registry
[--agent-pool]
[--auth-mode {Default, None}]
[--cmd]
[--file]
[--log-template]
[--no-format]
[--no-logs]
[--no-wait]
[--platform]
[--resource-group]
[--set]
[--set-secret]
[--source-acr-auth-id {[caller], none}]
[--timeout]
[--values]
[]
示例
将运行排队以执行容器命令。
az acr run -r myregistry --cmd '$Registry/myimage' /dev/null
使用标准输入中的任务定义对运行进行排队。 “Ctrl + Z”(Windows)或“Ctrl + D”(Linux)将终止输入流。
az acr run -r myregistry -f - /dev/null
将运行排队以执行通过管道传递的任务。
cat task.yaml | az acr run -r myregistry -f - /dev/null
使用流式处理日志将本地上下文排入队列,推送到 ACR。
az acr run -r myregistry -f bash-echo.yaml ./workspace
使用流式处理日志将远程 git 上下文排队。
az acr run -r myregistry https://github.com/Azure-Samples/acr-tasks.git -f hello-world.yaml
使用流式处理日志对远程 git 上下文进行排队,并在 Linux 平台上运行任务。
az acr run -r myregistry https://github.com/Azure-Samples/acr-tasks.git -f build-hello-world.yaml --platform linux
将远程 OCI 项目上下文排队并运行任务。
az acr run -r myregistry oci://myregistry.azurecr.io/myartifact:mytag -f hello-world.yaml
对运行进行排队,以在启用了 ABAC 的存储库权限注册表中执行容器命令,并使用调用方的 Entra 标识向源注册表进行身份验证。
az acr run -r myregistry --cmd '$Registry/myimage' /dev/null --source-acr-auth-id [caller]
必需参数
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
代理池的名称。
源注册表的身份验证模式。
属性 | 值 |
---|---|
接受的值: | Default, None |
要执行的命令。 这还支持其他 docker 运行参数(https://docs.docker.com/engine/reference/commandline/run/)甚至其他 docker 命令(https://docs.docker.com/engine/reference/commandline/docker/)。
相对于源上下文的任务模板/定义文件路径。 可以通过标准输入通过管道传递文件,也可以是“-”。
使用“log/repo:tag”格式(例如“acr/logs:{{.Run.ID}}”)运行日志项目的存储库和标记模板。 仅适用于已启用 CMK 的注册表。
指示日志是否应以原始格式显示。
属性 | 值 |
---|---|
默认值: | False |
成功排队生成后,不显示日志。
属性 | 值 |
---|---|
默认值: | False |
不要等待运行完成,并在运行排队后立即返回。
属性 | 值 |
---|---|
默认值: | False |
运行生成/任务的平台,例如“windows”和“linux”。 在生成命令中使用时,还可以在生成的图像的“os/arch/variant”格式中指定它。 Eg, linux/arm/v7. “arch”和“variant”部分是可选的。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
“name[=value]”格式的值。 传递 --set 多次支持的倍数。
“--set name[=value]”格式的机密值。 传递 --set 多次支持的倍数。
分配用于源注册表登录的标识。 对调用方标识使用“[调用方]”。
属性 | 值 |
---|---|
接受的值: | [caller], none |
超时(以秒为单位)。
任务值相对于源上下文的文件路径。
本地源代码目录路径(例如,'./src')或 git 存储库的 URL(例如,“https://github.com/Azure-Samples/acr-build-helloworld-node.git”),或远程 tarball(例如,“http://server/context.tar.gz”)或 Azure 容器注册表中 OCI 项目的存储库(例如,“oci://myregistry.azurecr.io/myartifact:mytag”。 如果指定了“/dev/null”,该值将设置为“无”并忽略。
属性 | 值 |
---|---|
Parameter group: | Positional |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr show
获取 Azure 容器注册表的详细信息。
az acr show --name
[--resource-group]
示例
获取 Azure 容器注册表的登录服务器。
az acr show -n myregistry --query loginServer
获取 Azure 容器注册表的详细信息
az acr show --name myregistry --resource-group MyResourceGroup
检查注册表上基于 ABAC 的存储库权限的状态。
az acr show --name myregistry --resource-group MyResourceGroup --query roleAssignmentMode
必需参数
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr show-endpoints
显示注册表终结点。
az acr show-endpoints --name
[--resource-group]
必需参数
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr show-usage
获取 Azure 容器注册表的存储使用情况。
az acr show-usage --name
[--resource-group]
示例
获取 Azure 容器注册表的存储使用情况。
az acr show-usage -n myregistry
必需参数
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az acr update
更新 Azure 容器注册表。
az acr update --name
[--add]
[--admin-enabled {false, true}]
[--allow-exports {false, true}]
[--allow-metadata-search {false, true}]
[--allow-trusted-services {false, true}]
[--anonymous-pull-enabled {false, true}]
[--data-endpoint-enabled {false, true}]
[--default-action {Allow, Deny}]
[--force-string]
[--public-network-enabled {false, true}]
[--remove]
[--resource-group]
[--role-assignment-mode {rbac, rbac-abac}]
[--set]
[--sku {Basic, Premium, Standard}]
[--tags]
示例
更新 Azure 容器注册表的标记。
az acr update -n myregistry --tags key1=value1 key2=value2
为 Azure 容器注册表启用管理员用户帐户。
az acr update -n myregistry --admin-enabled true
对现有注册表启用基于 ABAC 的存储库权限。
az acr update -n myregistry --role-assignment-mode rbac-abac
必需参数
容器注册表的名称。 它应以小写形式指定。 可以使用 az configure --defaults acr=<registry name>
配置默认注册表名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
指示是否启用管理员用户。
属性 | 值 |
---|---|
接受的值: | false, true |
配置 exportPolicy 以允许/禁止从此注册表导出项目。 可以通过导入或传输操作导出项目。 有关详细信息,请访问 https://aka.ms/acr/export-policy。
属性 | 值 |
---|---|
接受的值: | false, true |
启用或禁用注册表的元数据搜索功能。
属性 | 值 |
---|---|
接受的值: | false, true |
允许受信任的 Azure 服务访问网络受限注册表。 有关详细信息,请访问 https://aka.ms/acr/trusted-services。
属性 | 值 |
---|---|
Parameter group: | Network Rule Arguments |
接受的值: | false, true |
从未经身份验证的客户端启用注册表范围的拉取。
属性 | 值 |
---|---|
接受的值: | false, true |
为客户端防火墙配置启用专用数据终结点。
属性 | 值 |
---|---|
Parameter group: | Network Rule Arguments |
接受的值: | false, true |
如果未匹配规则,则应用的默认操作。 仅适用于高级 SKU。
属性 | 值 |
---|---|
Parameter group: | Network Rule Arguments |
接受的值: | Allow, Deny |
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | False |
允许对容器注册表进行公用网络访问。
属性 | 值 |
---|---|
Parameter group: | Network Rule Arguments |
接受的值: | false, true |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
注册表的角色分配模式。 有关此功能的详细信息,请参阅 https://aka.ms/acr/auth/abac。 默认值为 rbac。
属性 | 值 |
---|---|
Parameter group: | Permissions and Role Assignment Arguments |
接受的值: | rbac, rbac-abac |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
容器注册表的 SKU。
属性 | 值 |
---|---|
接受的值: | Basic, Premium, Standard |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |