How to Create an ACR Service Connection in Azure DevOps: A Step-by-Step Guide

 How to create Azure Devops Service Connection for Azure Container Registries (ACR)

Prerequisites:

  1. 1. You need to have an Azure DevOps organization with appropriate permissions.
  2. 2. You should have an Azure subscription with an Azure Container Registry (ACR) resource already created.

  3. Step 1. Log into Azure DevOps: Open your web browser and navigate to your Azure DevOps organization. Sign in with your credentials


  1. Step 2. Select Your Project : Choose the project where you want to create the service connection.

  1. Step 3.Open Project Settings: In the bottom left corner, click on the gear icon to access the project settings.
Step 4.Navigate to Service Connections: Under the “Pipelines” section, click on “Service connections”.




Step 5. Add a New Service Connection: Click on the “New service connection” button. A list of available connection types will appear.

Step 6. Choose Azure Container Registry: Select “Docker Registry” as the connection type, then choose “Azure Container Registry” from the dropdown menu.


  1. Step 7: Select Registry Type as Others. Now Go to Your ACR --> Go to Access keys under settings in your ACR



  2. Step 8: Enable Admin user and then copy Login server , Username and Password


  1. Step 9: Now paste the login server in Docker Registry , Username in Docker ID and Password in Docker Password

  2. Give your service connection a name, and if you want, check the box to grant access to all pipelines. 

  3. Verify and Save: Click on “Verify” to check the connection. Once successful, click “Save” to create the service connection.
                        
  1. Step 10. Use in Pipelines: Your ACR service connection is now ready to be used in your Azure DevOps pipelines for tasks such as image pulls or pushes.

Conclusion: By following these steps, you can easily set up an ACR service connection in Azure DevOps, enabling seamless integration between your development workflow and container registry.

Comments