Azure CI/CD Pipeline With ACR Private EndPoint

Lokesh Anji 5 Reputation points

Hi Everyone,

We have created an Azure DevOps pipeline and releases for CI/CD and we're using Azure container registry(ACR) for pulling/pushing the docker images, these pipelines/releases working and are able to pull/push the images without an issue as the Azure container registry(ACR) is public. But now our security team has asked us to make the ACR registry private, so we made ACR registry private using the private endpoint concept but now our pipelines/releases are failing as we made ARC private.


Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
415 questions
Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
484 questions
{count} vote

2 answers

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 18,667 Reputation points Microsoft Employee

    @Lokesh Anji

    • Once the public network access is disabled, Instances of certain Azure services including Azure DevOps Services are currently unable to access the container registry.
    • Private endpoints are not currently supported with Azure DevOps managed agents. You will need to use a self-hosted agent with network line of sight to the private endpoint.
    • Access to Azure Container Registry (ACR) can be restricted to the virtual network using Private Endpoints. This will limit ACR exposure to public internet. Since private ACR is available only within the vnet, self-hosted devops agents comes to the rescue.

    Configure the agent to access the private ACR: If you're using a self-hosted agent, ensure that the agent has access to the private ACR. You can do this by adding the agent's IP address to the allowed list in the ACR's firewall settings or by configuring the agent to use a private endpoint.

    Reference documentation:

    3 people found this answer helpful.
    0 comments No comments

  2. Bas Pruijn 951 Reputation points

    There are a few solutions to this issue:

    1. allow all ip addresses for DevOps Agents in your ACR firewall rule. This implies that your ACR is still accessible via the internet. This can be done via a service tag:
    2. allow the IP address for the currently used agent instance temporarily to the firewall of your ACR. This still allows public access to your ACR, but only for that one agent, and only during deployment. See
    3. use a self-hosted agent (

    The first solution is the easiest. However, ususally considered too insecure. The third option is the most secure. However, this option requires you to set-up a self-hosted agent and maintain it. Not maintaining it might also be a security risk. Best of both worlds would be to use the second approach, if allowed by your security team.

    0 comments No comments