What all is needed to upload containers to ACR with a Service Principle?


I’m trying to create a container and push it to Azure Container Registry. I’ve created a container group and Service Principle, but I can’t get docker push to work.

> docker login azure --client-id 12345678-90ab-cdef-1234-567890abcdef --client-secret b1bb1ty~b0pp1ty_b00. --tenant-id 01234567-89ab-cdef-0123-456789abcdef
login succeeded
> docker push myrepo.azurecr.io/my_image
Using default tag: latest
The push refers to repository [myrepo.azurecr.io/my_image]
17e1b7f147c1: Preparing
7497d9224318: Preparing
4f70bf18a087: Preparing
f2a9a0445b79: Preparing
24d83d67379e: Preparing
45c2210a0dee: Waiting
5cb3a39200e1: Waiting
c203d67ebc1d: Waiting
281bff2725de: Waiting
unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.

The app associated with the Service Principle has the Owner role in the container group, so it should be able to do anything it wants, including pushing images, but I still get the error message above, and the link it contains doesn’t say anything particularly useful on the subject. I’ve enabled diagnostic event logging on the container group, but my attempts generate no diagnostic information.

What more needs to be done before I’m able to successfully push an image to ACR?

Source: Docker Questions

Categorised as azure, azure-container-registry, docker Tagged , ,


Leave a Reply

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us