您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Azure 容器注册表 SKUAzure Container Registry SKUs

Azure 容器注册表 (ACR) 分为多个服务层(称为“SKU”)。Azure Container Registry (ACR) is available in multiple service tiers, known as SKUs. 这些 SKU 提供可预测的定价和多个选项,用来适应你在 Azure 中的专用 Docker 注册表的容量和使用模式。These SKUs provide predictable pricing and several options for aligning to the capacity and usage patterns of your private Docker registry in Azure.

SKUSKU 托管Managed 说明Description
基本Basic Yes 供开发者了解 Azure 容器注册表的入口点(已优化过成本)。A cost-optimized entry point for developers learning about Azure Container Registry. 基本注册表的编程功能(Azure Active Directory 身份验证集成、映像删除和 Webhook)与标准注册表和高级注册表相同。不同之处在于大小和使用情况约束。Basic registries have the same programmatic capabilities as Standard and Premium (Azure Active Directory authentication integration, image deletion, and web hooks), however, there are size and usage constraints.
标准Standard Yes 标准注册表的功能与基本注册表相同。不同之处在于,前者增加了存储空间上限和映像吞吐量。Standard registries offer the same capabilities as Basic, with increased storage limits and image throughput. 标准注册表应能够满足大部分生产方案的需求。Standard registries should satisfy the needs of most production scenarios.
高级Premium Yes 高级注册表对存储和并发操作等功能的约束限制更高,支持大容量方案。Premium registries provide higher limits on constraints such as storage and concurrent operations, enabling high-volume scenarios. 除了增加映像吞吐容量之外,高级注册表还增添了其他功能(如异地复制,用于跨多个区域管理一个注册表,并在每个部署中维护网络封闭注册表)。In addition to higher image throughput capacity, Premium adds features like geo-replication for managing a single registry across multiple regions, maintaining a network-close registry to each deployment.
经典Classic No 经典注册表 SKU 在 Azure 中启用了首版 Azure 容器注册表。The Classic registry SKU enabled the initial release of the Azure Container Registry service in Azure. 经典注册表由 Azure 在订阅中创建的存储帐户提供支持,这会限制 ACR 提供更高级功能,如增加吞吐量和异地复制。Classic registries are backed by a storage account that Azure creates in your subscription, which limits the ability for ACR to provide higher-level capabilities such as increased throughput and geo-replication. 由于功能有限,我们计划在未来弃用经典 SKU。Because of its limited capabilities, we plan to deprecate the Classic SKU in the future.

选择更高级别的 SKU 可以提供更好的性能和缩放,但是,所有托管的 SKU 都提供相同的编程功能。Choosing a higher-level SKU provides more performance and scale, however, all managed SKUs provide the same programmatic capabilities. 使用多个服务层,你可以从基本层开始,然后随着注册表使用量增长转换到标准和高级层。With multiple service tiers, you can get started with Basic, then convert to Standard and Premium as your registry usage increases.

备注

由于我们已计划弃用经典注册表 SKU,因此建议对所有新注册表使用基本、标准或高级 SKU。Because of the planned deprecation of the Classic registry SKU, we recommend you use Basic, Standard, or Premium for all new registries. 有关转换现有经典注册表的信息,请参阅升级经典注册表For information about converting your existing Classic registry, see Upgrade a Classic registry.

托管的与非托管的Managed vs. unmanaged

基本、标准和高级 SKU 统称为“托管的”注册表,而经典注册表是“非托管的”。The Basic, Standard, and Premium SKUs are collectively known as managed registries, and Classic registries as unmanaged. 两者之间的主要区别是容器映像的存储方式。The primary difference between the two is how your container images are stored.

托管的(基本、标准、高级)Managed (Basic, Standard, Premium)

托管的注册表受益于完全由 Azure 托管的映像存储。Managed registries benefit from image storage managed entirely by Azure. 也就是说,存储映像的存储帐户不会显示在 Azure 订阅中。That is, a storage account that stores your images does not appear within your Azure subscription. 使用托管的注册表 SKU 可以获得几个优势,Azure 容器注册表中的容器映像存储中对此进行了深入讨论。There are several benefits gained by using one of the managed registry SKUs, discussed in-depth in Container image storage in Azure Container Registry. 本文重点介绍托管的注册表 SKU 及其功能。This article focuses on the managed registry SKUs and their capabilities.

非托管的(经典)Unmanaged (Classic)

经典注册表是“非托管的”,这是因为,为经典注册表提供支持的存储帐户位于“你的” Azure 订阅中。Classic registries are "unmanaged" in the sense that the storage account that backs a Classic registry resides within your Azure subscription. 因此,将由你负责管理存储着你的容器映像的存储帐户。As such, you are responsible for the management of the storage account in which your container images are stored. 使用非托管的注册表时,无法在需求发生变化时在各种 SKU 之间切换(除非升级到托管的注册表),并且无法使用托管的注册表的多项功能(例如,容器映像删除、异地复制Webhook)。With unmanaged registries, you can't switch between SKUs as your needs change (other than upgrading to a managed registry), and several features of managed registries are unavailable (for example, container image deletion, geo-replication, and webhooks).

有关将经典注册表升级到托管的 SKU 之一的详细信息,请参阅升级经典注册表For more information about upgrading a Classic registry to one of the managed SKUs, see Upgrade a Classic registry.

SKU 功能矩阵SKU feature matrix

下表详细介绍了基本、标准和高级服务层的功能和限制。The following table details the features and limits of the Basic, Standard, and Premium service tiers.

资源Resource 基本Basic 标准Standard 高级Premium
存储Storage 10 GiB10 GiB 100 GiB100 GiB 500 GiB500 GiB
最大映像层大小Max image layer size 20 GiB20 GiB 20 GiB20 GiB 50 GiB50 GiB
每分钟读取操作数1、2ReadOps per minute1, 2 10001000 30003000 1000010000
每分钟写入操作数1、3WriteOps per minute1, 3 100100 500500 20002000
下载带宽 (MBps)1Download bandwidth MBps1 3030 6060 100100
上传带宽 (MBps)1Upload bandwidth MBps1 1010 2020 5050
WebhookWebhooks 22 1010 100100
异地复制Geo-replication 不适用N/A 不适用N/A 支持Supported

1读取操作数、写入操作数和带宽是最小估计值。1 ReadOps, WriteOps, and Bandwidth are minimum estimates. ACR 旨在随使用情况增多提升性能。ACR strives to improve performance as usage requires.

2docker pull 根据映像中的层数和清单检索行为转换为多个读取操作。2 docker pull translates to multiple read operations based on the number of layers in the image, plus the manifest retrieval.

3docker push 根据必须推送的层数转换为多个写入操作。3 docker push translates to multiple write operations, based on the number of layers that must be pushed. docker push 包含 ReadOps,用于检索现有映像的清单。A docker push includes ReadOps to retrieve a manifest for an existing image.

更改 SKUChanging SKUs

可以通过 Azure CLI 或在 Azure 门户中更改注册表的 SKU。You can change a registry's SKU with the Azure CLI or in the Azure portal. 你可以自由地在各种托管的 SKU 之间切换,只要你要切换到的 SKU 具有所需的最大存储容量即可。You can move freely between managed SKUs as long as the SKU you're switching to has the required maximum storage capacity. 如果从经典 SKU 切换到托管的 SKU 之一,则无法切换回经典 SKU,因为这是一个单向转换。If you switch to one of the managed SKUs from Classic, you cannot move back to Classic--it is a one-way conversion.

Azure CLIAzure CLI

若要使用 Azure CLI 在各种 SKU 之间切换,请使用 az acr update 命令。To move between SKUs in the Azure CLI, use the az acr update command. 例如,若要切换到高级 SKU,请使用以下命令:For example, to switch to Premium:

az acr update --name myregistry --sku Premium

Azure 门户Azure portal

在 Azure 门户中的容器注册表“概述”中,选择“更新”,然后从“SKU”下拉列表中选择一个新 SKU。In the container registry Overview in the Azure portal, select Update, then select a new SKU from the SKU drop-down.

在 Azure 门户中更新容器注册表 SKU

如果你有经典注册表,则无法在 Azure 门户中选择托管的 SKU。If you have a Classic registry, you can't select a managed SKU within the Azure portal. 而是必须先升级到托管的注册表(请参阅转换经典注册表)。Instead, you must first upgrade to a managed registry (see Changing from Classic).

转换经典注册表Changing from Classic

将非托管的经典注册表迁移到托管的基本、标准或高级 SKU 之一时,需要考虑一些其他注意事项。There are additional considerations to take into account when migrating an unmanaged Classic registry to one of the managed Basic, Standard, or Premium SKUs. 如果你的经典注册表包含大量映像,并且其大小为许多 GB,则迁移过程可能要花费一些时间。If your Classic registry contains a large number of images and is many gigabytes in size, the migration process can take some time. 此外,在迁移完成之前,docker push 操作会被禁用。Additionally, docker push operations are disabled until the migration is complete.

有关将经典注册表升级到托管的 SKU 之一的详细信息,请参阅升级经典容器注册表For details on upgrading your Classic registry to one of the managed SKUs, see Upgrade a Classic container registry.

定价Pricing

有关每个 Azure 容器注册表 SKU 的定价信息,请参阅容器注册表定价For pricing information on each of the Azure Container Registry SKUs, see Container Registry pricing.

后续步骤Next steps

Azure 容器注册表路线图Azure Container Registry Roadmap

访问 GitHub 上的 ACR 路线图,了解服务即将推出的新功能。Visit the ACR Roadmap on GitHub to find information about upcoming features in the service.

Azure 容器注册表 UserVoiceAzure Container Registry UserVoice

ACR UserVoice 中提交新功能建议,以及对新功能建议进行投票。Submit and vote on new feature suggestions in ACR UserVoice.