3

Using the Azure CLI on Windows Server 2016 against an Azure container registry (az login and az acr login)

I'm pushing a large Windows container docker image (>10GB) with docker push. It seems the authentication expires before it finishes.

The smaller layers of the image push successfully and finish, but the largest reaches 100% before declaring

unauthorized: authentication required

Is there some way to extend the duration of the authentication (az acr login) so that the complete push finishes?

2 Answers2

1

A functioning workaround appears to be to ignore az acr login entirely, and go straight to docker login which actually caches its credentials

I used the workaround of enabling the administrator account and logging in with that in order to push - but this still works with RBAC/user accounts besides the administrator too

0

3 hours is currently the timeout for Azure CLI logins. So, maybe authentication is really timing out on a 10 GB image.

However, in my case, I found that the container's image's repository path needed to all lower case. Once I did this I no longer had authorization issues.

PS> docker images --all REPOSITORY TAG IMAGE ID
my-asp-app latest a1f5b7c1e076
myFirstContainerRegistry3364629895.azurecr.io/my-asp-app
v1 a1f5b7c1e076
myfirstcontainerregistry3364629895.azurecr.io/my-asp-app
v1 a1f5b7c1e076