2

I'm getting this error in my Azure Pipeline (devOps) when it tries to build the image and I can not find a solution for this problem. It only happens in few pipelines, and all of them are configured in the same way.

Here I leave an image with the error:

Error description

Thank you.

  • Does this answer your question? [The docker client must be run elevated to connect](https://stackoverflow.com/questions/57460393/the-docker-client-must-be-run-elevated-to-connect) – dejanualex Apr 28 '21 at 08:25
  • It does not. My docker problem is building images in Azure DevOps not locally. And it only happens for few of them. Thanks for your answer! – Dani Alderete Apr 28 '21 at 08:36
  • Please post formatted text, rather than pictures of text. – BMitch Apr 28 '21 at 09:47
  • Do you mind check the 'Enable system diagnostics' when you run the build and share us the full debug logs? – Felix Apr 29 '21 at 07:47

3 Answers3

0

Given that you provided few information i will make some assumptions and try to answer you question. Stuff you can try:

It is possible you have docker configured to run on linux container and you have a container that wants to run on top of a windows OS. So make sure you have all your containers on top of the same OS.

Opri
  • 590
  • 2
  • 11
0

Try to change the user for your agent host: "We changed the agent to run as the "devops" user and now it works."

Side-note: Containers with a ENTRYPOINT might not work, since Azure Pipelines will docker create an awaiting container and docker exec a series of commands which expect the container is always up and running.

dejanualex
  • 3,872
  • 6
  • 22
  • 37
0

The problem was solved. We had a custom agent, so we have a VM with Docker running inside it, and the solution was to run Docker with admin privileges