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)
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With