Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save donchev7/a53a4d0f3612cbfcab98d5381771c2cc to your computer and use it in GitHub Desktop.
Save donchev7/a53a4d0f3612cbfcab98d5381771c2cc to your computer and use it in GitHub Desktop.
Move images between 2 Azure ACR registries
# Source ACR
repositories=$(az acr repository list -n <sourceACRName>)
for r in $repositories; do az acr repository show-manifests -n <sourceACRName> --repository $r ; done
cat response.json | jq -r '.[].tags[0]' | grep -v null | xargs -n 1 -I % sh -c "az acr import -n <sourceACRName> --source $REPO:% --image $REPO:% --registry <scopeId>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment