Simple steps to build image and push through Azure Devops Build pipeline:
Solution:
In the Build and image and Push an image make sure you have given fully qualified name
Image Name *: rajkrs/docker_linux_redis_netcore:$(Build.BuildId)
- Create a new build pipeline form Use the classic editor.
- Select a source from GitHub and choose repository after authentication.
- Choose a template Docker Container.
- Configure Build and Push task.
- Save and Queue.
If you are getting bellow problem,
denied: requested access to the resource is denied
##[error]denied: requested access to the resource is denied
##[error]/usr/bin/docker failed with return code: 1
In the Build and image and Push an image make sure you have given fully qualified name
Image Name *: rajkrs/docker_linux_redis_netcore:$(Build.BuildId)