Сбой при доставке и создании образа в реестре контейнера Azure в конвейере Azure DevOps. Предыдущие задачи выполняются нормально т.е. Создание образа докера и успешный вход в ACR. Однако push-задача завершается неудачно со следующим результатом:
unauthorized: authentication required
[error]unauthorized: authentication required
[error]/usr/bin/docker failed with return code: 1
[section]Finishing: Push Docker image
docker push к этому заданному acr отлично работает из локальной командной строки.
# Docker image
# Build a Docker image to deploy, run, or push to a container registry.
# Add steps that use Docker Compose, tag images, push to a registry, run an image, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- master
pool:
vmImage: 'Ubuntu-16.04'
variables:
imageName: 'renamed:$(build.buildId)'
azureSubscriptionEndpoint: Renamed
azureContainerRegistry: renamed.azurecr.io
steps:
- task: Docker@1
displayName: Build docker image
inputs:
command: Build an image
dockerFile: Dockerfile
imageName: $(imageName)
containerregistrytype: Azure Container Registry
azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
azureContainerRegistry: $(azureContainerRegistry)
- task: Docker@1
displayName: Login to container registry
inputs:
command: login
containerregistrytype: Azure Container Registry
azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
azureContainerRegistry: $(azureContainerRegistry)
dockerFile: Dockerfile
imageName: $(imageName)
- task: Docker@1
displayName: Push Docker image
inputs:
command: Push an image
containerregistrytype: Azure Container Registry
azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
azureContainerRegistry: $(azureContainerRegistry)
imageName: $(imageName)