### Get the registry root GET https://registry-1.docker.io/
### Get the registry root GET https://registry-1.docker.io
### Get the registry root GET http://registry-1.docker.io
### Get the /v2 endpoint
# As per the instructions at https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md | |
# Prep: Set env variables | |
registry="<USE_YOUR_REGISTRY_HERE>" | |
tenant="<USE_YOUR_TENANT_HERE>" | |
subscription="<USE_YOUR_SUBSCRIPTION_HERE>" | |
scope="registry:catalog:*" | |
# Step 1: Get AAD access token | |
aad_access_token=`az account get-access-token --subscription $subscription --query "accessToken" --output tsv` | |
echo $aad_access_token | |
# Step 2: Get a refresh token for ACR |
### Get the registry root GET https://registry-1.docker.io/
### Get the registry root GET https://registry-1.docker.io
### Get the registry root GET http://registry-1.docker.io
### Get the /v2 endpoint