Azure CLI reminder¶
Connection to azure domain¶
az login
Interact with azure registry¶
List all image from a registry
az acr repository list -n registry
List all tag of an image
az acr repository show-tags -n registry --repository app/sso/wbs_interface_sso
Delete specific tag of an image
az acr repository delete -n registry --repository debian --tag jessie-slim1
Create security credentials for azure registry¶
ACR user accounts documentation
Create Read/Write user for azure registry¶
az ad sp create-for-rbac --scopes subscriptions/<subscription_id>/resourceGroups/<group_id>/providers/Microsoft.ContainerRegistry/registries/registry --role Contributor --password <password> --years <N>
Setup docker login Read/Write¶
mkdir -p /home/<user>/.docker/ && echo "{\"auths\": {\"registry\": {\"auth\": \"<token>\"}}}" > /home/<user>/.docker/config.json
Create Read Only user for azure registry¶
az ad sp create-for-rbac --scopes subscriptions/<subscription_id>/resourceGroups/<group_id>/providers/Microsoft.ContainerRegistry/registries/registry --role Reader --password <password> --years <N>
Setup docker login Read Only¶
mkdir -p /home/<user>/.docker/ && echo "{\"auths\": {\"registry\": {\"auth\": \"<token>\"}}}" > /home/<user>/.docker/config.json
Get list of organization and emails¶
az account list --query '[].[name, user.name]'