This cheatsheet is designed for DevOps personnel to quickly create, manage, and troubleshoot Azure Container Registry resources utilizing the Azure CLI.
Example: Crea un nuovo registro ACR.
az acr create --name <acrName> --resource-group <rg> --sku Basic --location <location>
Example: Elenca tutti i registri ACR nel gruppo di risorse.
az acr list --resource-group <rg> --output table
Example: Mostra i dettagli di un registro ACR.
az acr show --name <acrName> --resource-group <rg>
Example: Aggiorna le impostazioni (ad esempio, abilitare il contenitore admin).
az acr update --name <acrName> --admin-enabled true
Example: Elimina un registro ACR.
az acr delete --name <acrName> --resource-group <rg>
Example: Effettua il login al registro ACR per autenticarsi con Docker.
az acr login --name <acrName>
Example: Costruisci un’immagine container e salvala nel registro ACR.
az acr build --registry <acrName> --image <imageName>:<tag> .
Example: Esegue un task per analisi o scansione dell’immagine.
az acr run --registry <acrName> --cmd "echo Hello World" /dev/null
Example: Importa un’immagine da un registro esterno.
az acr import --name <acrName> --source <externalRegistry>/<repository>:<tag>
Example: Visualizza i manifesti del repository di un’immagine.
az acr repository show-manifests --name <acrName> --repository <repositoryName>