为什么 TeamCity 无法识别带有 jetbrains/agent 图像的 docker 服务器属性?

Why doesn't TeamCity recognize docker server properties with the jetbrains/agent image?

我有一个 ECS Fargate 服务 运行 jetbrains/teamcity-agent 映像。这连接到我的 TeamCity 主机,它是 EC2 实例 (windows) 上的 运行。

当我检查代理是否能够执行 运行 docker 命令时,它显示以下错误:

未满足的要求: docker.server.osType 包含 linux docker.server.version 存在

在代理参数 -> 配置参数下,我可以正确地看到 docker 版本和 dockerCompose.version。是否有我缺少的设置?

如果您尝试访问 Fargate 中的 docker 套接字,Fargate 不支持 运行 docker 命令,有一个proposed ticket 此功能。

the issue with "docker.server.osType" not showing up usually means that the docker command run from the agent cannot connect with the docker daemon running. This is usually due to a lack of permissions, as docker by default only allows connections from root and users of the group docker

Teamcity-Unmet-requirements-docker-server-osType-contains-linux

我遇到了类似的问题,通过在“docker”组和 restarted/rebooted 服务器中添加“build agent”用户来解决这些问题。

其中 build agent user ==> 表示您的 TeamCity 服务的用户 运行。

将用户添加到组的命令

#chmod -a -G docker <userasperyourrequirement>

重启服务器的命令:

 #init 6