I tried pulling and pushing images or files from the local system and it works perfectly fine but when I tried with the Azure DevOps pipeline it fails. Docker login was successful but it fails when I want to pull the image from the acr with the following result:
Error response from daemon: Head "*/a2/abcd/manifest/latest": unauthorized: Invalid clientid or client secret.
My Yaml looks like this:
trigger: none
schedules:
- cron: "0 0 0 * *"
displayName: **** *
branches:
include:
- abcd
always: true
pool:
vmImage: 'ubuntu-latest'
variables:
- name: acrname
value: *****.azurecr.io
stages:
- stage: abcd
displayName: "pull images from acr"
jobs:
- job: abcdef
displayName: "abcdef"
pool:
vmImage: ubuntu-latest
steps:
- task: Docker@2
displayName: Login to ACR
inputs:
command: login
containerRegistry: '*****.azurecr.io'
- bash: |
docker pull $(acrname)/abc-def:latest
docker pull $(acrname)/igh-jkl:latest
name: pull
displayName: 'pull acr images'
Can someone find me a solution for this?