Back
I have created a docker container using Dockerfile, but when use it for Azure DevOps container job. It throws an error:
# [error]Azure CLI 2.x is not installed on this machine.
Can anyone help me how do I rectify this error?
You can try the below command from your pipeline. It will work fine:
- task: AzureCLI@1 displayName: 'Azure CLI ' inputs: azureSubscription: xxxxx scriptLocation: inlineScript inlineScript: 'az acr list'
- task: AzureCLI@1
displayName: 'Azure CLI '
inputs:
azureSubscription: xxxxx
scriptLocation: inlineScript
inlineScript: 'az acr list'
Now, that will install Azure CLI.
I hope this will help.
Want to become an Azure DevOps expert? join azure devops certification now!!
31k questions
32.8k answers
501 comments
693 users