Az - ACR
基本信息
Azure Container Registry (ACR) 是由 Microsoft Azure 提供的托管服务,用于存储和管理 Docker 容器映像和其他工件。它提供集成的开发人员工具、地理复制、诸如基于角色的访问控制和映像扫描等安全功能、自动构建、Webhooks 和触发器以及网络隔离。它与 Docker CLI 和 Kubernetes 等流行工具配合使用,并与其他 Azure 服务很好地集成。
枚举
要枚举该服务,您可以使用脚本 Get-AzACR.ps1:
Azure Container Registry (ACR)
List all ACRs in a subscription
To list all Azure Container Registries (ACRs) in a subscription, use the following command:
Replace <subscription_id>
with the ID of the subscription you want to list the ACRs for.
Show details of a specific ACR
To show details of a specific Azure Container Registry (ACR), use the following command:
Replace <acr_name>
with the name of the ACR you want to show details for, and <resource_group_name>
with the name of the resource group the ACR belongs to.
Delete an ACR
To delete an Azure Container Registry (ACR), use the following command:
Replace <acr_name>
with the name of the ACR you want to delete, and <resource_group_name>
with the name of the resource group the ACR belongs to.
Az Powershell
Azure CLI is a command-line tool that provides a set of commands used to manage Azure resources. Azure CLI is available on Windows, macOS, and Linux. Azure CLI commands can be executed in the Azure Cloud Shell or in a local installation of Azure CLI.
Installation
To install Azure CLI on Windows, you can download and run the MSI installer from the Azure CLI website. On macOS, you can use Homebrew by running brew update && brew install azure-cli
. On Linux, you can use the package manager of your distribution to install Azure CLI.
Authentication
Azure CLI supports several authentication methods, including Azure Active Directory (AD), service principals, and managed identities. You can log in to Azure CLI using the az login
command and follow the instructions to authenticate.
Example Commands
Here are some example Azure CLI commands:
az login
: Log in to Azure CLI.az group list
: List all resource groups in the subscription.az vm create --resource-group MyResourceGroup --name MyVM --image UbuntuLTS
: Create a virtual machine.
Scripting
You can also write scripts using Azure CLI commands to automate tasks suchjson as resource provisioning, configuration management, and monitoring.
登录并从注册表中拉取
Last updated