Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Docker registry service connection?

Following this documentation, Docker registry service connection is found in the following YAML. What is Docker registry service connection and where can it be found?

trigger:
- master

variables:
  # Container registry service connection established during pipeline creation
  dockerRegistryServiceConnection: <Docker registry service connection>
  imageRepository: <Name of your image repository>
  containerRegistry: <Name of the Azure container registry>
  dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile'
  tag: '$(Build.BuildId)'

  # Agent VM image name
  vmImageName: 'ubuntu-latest'

- task: AzureWebAppContainer@1 # Add this at the end of your file
  inputs:
    azureSubscription: '<Azure service connection>'
    appName: '<Name of the container web app>'
    containers: $(containerRegistry)/$(imageRepository):$(tag)
like image 625
crayden Avatar asked Sep 06 '25 19:09

crayden


2 Answers

A service connection is a connector to an external service (see here). A Docker registry service connection basically is a connector to a Docker registry. You can set it here:

Azure Devops project home Azure devops project settings add service connection

like image 188
mmking Avatar answered Sep 08 '25 23:09

mmking


mmking's answer covers the what part of the question, but not where can it be found.

After adding a "Docker Registry" service connection, select it from the list of service connections. The url will look something like:

https://your-org.visualstudio.com/YourProject/_settings/adminservices?resourceId=0b6c0705-9fbb-40ec-b629-95cd92856257

Take the resourceId from the query string, which is "0b6c0705-9fbb-40ec-b629-95cd92856257" in the above example, and use it as the dockerRegistryServiceConnection value.

like image 33
Americus Avatar answered Sep 08 '25 21:09

Americus