0

I created an Azure DevOps agents based on the Ubuntu image that can be found here: https://github.com/Microsoft/azure-pipelines-image-generation

After I deployed the machine and installed the agent (see https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=vsts) I ran a Docker task and got the following error:

dial unix /var/run/docker.sock: connect: permission denied

What do I have to do to get the Docker task executed successfully?

4

1 回答 1

1

问题是代理服务没有连接权限。您可以以sudo ./svc.sh install root我不推荐的 root () 身份运行代理服务,也可以通过将用户添加到 Docker 组sudo usermod -a -G docker $USER

然后注销并再次登录,它应该可以工作。

另请参阅https://docs.docker.com/install/linux/linux-postinstall/

于 2018-11-28T10:47:28.747 回答