Unable to Pull Docker image from Private Registry (Azure Container Registry)

I want to run Gitlab CI pipeline in Container for that I have installed Docker in Azure VM(Ubuntu) and Registered Gitlab Runner in that VM.
Here I am using Gitlab Specific Runner
In the Yaml file I have specified my Private Container image but when commit the Yaml file Its throwing error with below message
"Unable to Pull image with Policy always.

I tried checking with network configuration of my VM
And with Authentication method as well

But both are not working

Can anyone please help me out with this

Hi,

please see in the docs how to setup access to private registry.

1 Like

Hi Balonik
Thank you for your quick response
I have tried setting up with DOCKER_AUTH_CONFIG as environment variable it’s authenticating but still not able to pull the docker image

I’m having the same issue. I’m trying to pull from a private ACR from an Azure VM using Managed Identity.

When the pipeline starts it attempts to pull the image and fails with error “unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information. (manager.go:237:0s)”

If I run az login --identity and az acr log --name <registry> then the .docker/config.json file gets updated with the auth and identity token, and pipeline works until the token expires with error “unauthorized: authentication required (manager.go:237:0s)”

I don’t see how the DOCKER_AUTH_CONFIGS would work with managed identity. Any suggestions?