0

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?

  • proper layering. questionmark – 4c74356b41 Feb 12 at 12:57
  • @4c74356b41 proper layering is not under my control here, this is Windows server core + the MSDN documented means of installing VS build tools – David Roberts Feb 12 at 14:47
  • why not? have the base in the registry, create a layer with build tools on top of it and push it to the registry, after that you only need to push diffs – 4c74356b41 Feb 12 at 14:52
  • @4c74356b41 the base image is already in the registry (and all those pushes complete successfully separately any way) - the issue is the build tools add a single 50GB+ layer as the result of a one line addition to the Dockerfile. Again - I don't have much control over this: docs.microsoft.com/en-us/visualstudio/install/… – David Roberts Feb 13 at 9:25
  • you dont really need to rebuild build tools on each build – 4c74356b41 Feb 13 at 9:27
0

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.