简体   繁体   中英

Build a docker image from Azure Pipeline Task

In the folliwing documentation https://learn.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops

it is mentioned that - "Be sure your pipelines agent has permission to access the Docker daemon." How to check it, configure it and provide the permission if necessary

I get the following error while building a docker image on a VM machine with docker installed on it:

open //./pipe/docker_engine: Access is denied. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Already checked that the docker daemon is running with the following command:

docker --version 

And I can see the docker version

Docker version 19.03.5, build 2ee0c57608

Verify that services using System account. The service is created when configuring the agent

Screen for the configuration

It is mentioned that - "Be sure your pipelines agent has permission to access the Docker daemon." How to check it, configure it and provide the permission if necessary.

It's the user which run the agent . You need to make sure that user have enough permission. Or you could switch your agent to run as the same user which docker daemon is running as.

More details about the error you could also kindly refer this similar issue: container jobs fails to connect to docker daemon on Windows Server 2019

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM