我正在尝试使用 Docker 运行构建代理并将其连接到我的 TeamCity 服务器。我执行这个命令:
docker run -it -e SERVER_URL="xxxx:8111" jetbrains/teamcity-agent
[2019-08-12 11:02:45,218] WARN - buildServer.AGENT.registration -
Error while asking server for the communication prot
ocols via URL http://xxxx:8111/app/agents/protocols. Will try
later: java.net.ConnectException: Connection timed
out: connect (enable debug to see stacktrace)
[2019-08-12 11:02:45,218] WARN - buildServer.AGENT.registration -
Error registering on the server via URL http://xxxx:8111. Will continue repeating connection attempts.
最佳答案
Docker 链接是帮助我的解决方案:
--link Add link to another container
这不是推荐的方式,我们需要使用 端口 .但这是让它运行的快速方法。--link teamcity-server-instance
这是我的 docker run 来设置代理:docker run -d -e SERVER_URL="http://teamcity-server-instance:8111" --link teamcity-server-instance -v <local_volume_mount>:/data/teamcity_agent/conf jetbrains/teamcity-agent
关于docker - TeamCity 构建代理 : Error registering on the server via URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57465403/