cra*_*den 6 azure docker azure-devops azure-pipelines azure-container-registry
在此文档之后,Docker registry service connection可在以下 YAML 中找到。什么是Docker registry service connection,在哪里可以找到?
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)
Run Code Online (Sandbox Code Playgroud)
Ame*_*cus 15
mmking的回答涵盖了问题的“what”部分,但没有涵盖在哪里可以找到。
添加“DockerRegistry”服务连接后,从服务连接列表中选择它。该网址将类似于:
https://your-org.visualstudio.com/YourProject/_settings/adminservices?resourceId=0b6c0705-9fbb-40ec-b629-95cd92856257
Run Code Online (Sandbox Code Playgroud)
从查询字符串中获取resourceId(上例中为“0b6c0705-9fbb-40ec-b629-95cd92856257”),并将其用作 dockerRegistryServiceConnection 值。
| 归档时间: |
|
| 查看次数: |
5304 次 |
| 最近记录: |