No docker version on host agent - WSL

I am running TeamCity on a Windows PC which has Docker installed on WSL (Ubuntu).

I have a build config which has a Docker step and my 'host' agent is incompatible due to 

Unmet requirements:

  • docker.server.osType exists
  • docker.server.version exists

I previously had Docker Desktop installed and the build ran fine. I've removed it due to frequent startup failures, and now have Docker just on the CLI (https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository) and then created an alias so that running `docker --version` in Powershell displays the version successfully. How can I make this docker setup work within TeamCity?

0
5 comments
Hi,

You can check it using the following methods:

- Verify the agent parameters by navigating to Agent pool → Agent → Parameters, and check if it contains Docker-related information.
- Debug the agent remotely following the guide: Debug Agents Remotely(https://www.jetbrains.com/help/teamcity/install-and-start-teamcity-agents.html#Debug+Agents+Remotely).

In some cases, restarting the agent may resolve the issue.

Best Regards,
Tom
0

Hi Tom, thanks for your reply. There are no Docker-related parameters in the list. The agent is my own machine so no need to debug remotely but I don't know how to troubleshoot why TC can't find Docker. I have restarted but no joy.

 

0
Hi,

If no Docker-related parameters appear in the list, it is expected that the agent will be marked as incompatible. If feasible, consider reinstalling Docker Desktop with WSL integration enabled. Despite its occasional startup issues, Docker Desktop offers better integration with Windows compared to standalone Docker on WSL.

For any questions or concerns, please do not hesitate to reach out.

Best Regards,
Tom
0

I'd like to avoid Docker Desktop if at all possible. Where do the parameters for an agent get populated from? If I'm able to understand why the docker parameters aren't coming through to TeamCity, I might be able to solve the problem.

0

In the end this was super easy. All I needed to do was run

chocolatey install docker in Windows Powershell and TeamCity instantly picked up this Docker config and I don't ever have to deal with Docker Desktop again!

0

Please sign in to leave a comment.