There are similar answers like this one. As far as I can see, there is no way to login via Docker Compose in yaml.
Names changed for brevity. The error I am getting is:
Pushing [container] ([registry]/[app]:latest)…
The push refers to repository [docker.io/[registry]/[container]] denied: requested access to the resource is denied
azure-pipeline.yml file, I have the following task:
task: [email protected] displayName: Compose push customer API inputs: azureSubscriptionEndpoint: $(azureSubscriptionEndpoint) azureContainerRegistry: $(azureContainerRegistry) dockerComposeCommand: 'push [container]' dockerComposeFile: docker-compose.yml qualifyImageNames: true projectName: "" dockerComposeFileArgs: | TAG=$(Build.SourceBranchName)
I’ve tried setting
containerregistrytype to “Azure Container Registry”, but this made no difference.
I have also granted the Service Principle I am using Owner access to the ACR (and the entire resource group), but this has made no difference.
One thing that stands out to in the error is “the push refers to repository [docker.io“. Should this not be *.azurecr.io, which is the ACR domain? It is almost like Azure Devops is using the non-Azure container registry type.
Is this a bug in Azure DevOps or do I need to set more permissions somewhere?