While learning how to use Azure Container Registry with the official tutorial : https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal?tabs=azure-cli
I tried to push images to my registry, the Hello World image in the course works fine, but when i try to use my own images it fails. It also fails when i pull images from docker and try to push them to my Azure registry.
Of course, the images are correctly tagged and the CLI connection works fine.
i’m also following another Azure course in which i build the image with Github actions ( https://learn.microsoft.com/en-us/azure/aks/kubernetes-action ), it also works great on the repo of this course, but once i try with my own projects, it fails. This time the error is about the url / the credentials :
After investigations, i’m sure that the credentials are correct, but the URL is maybe false because it never create it. That’s why i was trying to push it manually in the first place.
EDIT : I managed to make it work by changing the wifi source i used, but i still don’t understand how is this possible, why it doesn’t work on github actions and what should i change in my conf to make it work with the original wifi again.
2
Answers
I tried to reproduce the same issue in my environment and got the below output
I have created the docker file and write the some script
I have build the docker file using below command
I have run the Image id using the below command
Created the container registry
After creating the registry we should enable the Access key if not we will not able to fetch the image to container instances
I have logged into the registry server
After succeeded I have pushed the image into the container registry
I have tagged the image and pushed into the registry
Here we can find the image in repositories which we have pushed
I have created the container instance, while creating we have to give the Image resource as container registry then only we will get the pushed image
I met the exact same issue and didn’t understood why.
Then I just logout from my VPN and it works.
Ain’t got any explanations about this but I hope it could help people which are stuck.