我在 DevOps Build Pipeline 中创建了一个 Build Docker Image 任务。 在此任务中,选择 Azure 订阅后,Azure 容器注册表列表显示未找到结果消息。
尽管我已在该订阅中创建了 ACR,但我无法通过 DevOps Build Pipeline 连接到它。
此问题与权限或其他问题有关吗?
最佳答案
您是否创建了 Service Principal Azure DevOps 管道?创建后,您可以根据您想要执行的操作赋予它适当的角色。
# Assign the desired role to the service principal. Modify the '--role' argument
# value as desired:
# acrpull: pull only
# acrpush: push and pull
# owner: push, pull, and assign roles
az role assignment create --assignee $SERVICE_PRINCIPAL_ID --scope $ACR_REGISTRY_ID --role acrpull
关于azure - 无法将 Azure-DevOps 与 Azure 容器注册表连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55832289/