Pulling docker image from ACR: certificate is valid for northeurope, but not westeurope
I want to, in an Azure DevOps pipeline, pull a container image from an Azure Container Registry.
We have an two Azure Container Registries, one for test and one for prod. They are both configured to use a private endpoint connection, and they are both located in west Europe. The only difference between test and prod, as far as I know, is that the production one is set up to use geo-replication with west & north Europe configured.
It works fine in test, but fails when I try doing the same thing for the prod container registry. Here's the error message I'm getting:
2025-04-08T08:36:30Z FATAL Fatal error image scan error: scan error: scan failed: failed analysis: unable to get the image ID: unable to get the image ID: Get "https://theregistry.westeurope.data.azurecr.io?c=REDACTED&d=REDACTED&h=REDACTED&l=REDACTED&p=REDACTED&r=REDACTED&s=REDACTED&t=REDACTED&v=REDACTED": tls: failed to verify certificate: x509: certificate is valid for *.northeurope.data.azurecr.io, *.azurecr.io, *.data.azurecr.io, not theregistry.westeurope.data.azurecr.io
The mention of north europe, and the fact that it works in test, leads me to believe it has to do with the geo-replication. But I have no clue what to do to make it work for the prod ACR.
Here's how I login:
task: Docker@2
displayName: Login to ACR
inputs:
command: login
containerRegistry: "Container Registry Service Connection Name"
And here's the pulling:
- task: Bash@3
displayName: Pulling docker image
inputs:
targetType: inline
script: |
docker pull theregistry.azurecr.io/theimage:latest
Any ideas?
Thanks