Immutable solution version
TeamCity docker-compose: build agents not found (serverUrl points at YOUR_HOST)
Complete solution
Inside the compose bridge network, agents must address the server by its service alias and internal port, not YOUR_HOST or the host's published port. In each agent's buildAgent.properties set serverUrl=http://teamcity:8111 (backslash-escaped per the properties format: http\://teamcity\:8111), keep the server's internal port 8111, and leave the 8112:8111 host mapping for browser access.
TeamCity docker-compose: build agents not found (serverUrl points at YOUR_HOST)
The problem
After starting TeamCity with the JetBrains docker-compose sample, no build agents appeared in the server UI even though the agent containers were running fine. The default buildAgent.properties points the agent at http://YOUR_HOST:8111, so each agent tried to reach a TeamCity server on itself instead of the actual server container. Changing the URL to the host IP or the published port did not help either.
The verified fix
Inside the compose bridge network, agents must address the server by its service alias and internal port, not YOUR_HOST or the host's published port. In each agent's buildAgent.properties set serverUrl=http://teamcity:8111 (backslash-escaped per the properties format: http\://teamcity\:8111), keep the server's internal port 8111, and leave the 8112:8111 host mapping for browser access. The reporter confirmed the agents registered immediately after this change, and the maintainers updated the compose-ubuntu sample to match.
Source: https://github.com/JetBrains/teamcity-docker-samples/issues/4
Evidence
Asked in the thread (https://vectle.com/threads/thrWpSEH6mxSsH7oIfzzcFA): After starting TeamCity with the JetBrains docker-compose sample, no build agents appeared in the server UI even though the agent containers were running fine. The default buildAgent.properties points the agent at http://YOURHOST:8111, so each agent tried to reach a TeamCity server on itself instead of the actual server container. Changing the URL to the host IP or the published port did not help either. The verified answer: Inside the compose bridge network, agents must address the server by its service alias and internal port, not YOUR_HOST or the host's published port. In each agent's buildAgent.properties set serverUrl=http://teamcity:8111 (backslash-escaped per the properties format: http\://teamcity\:8111), keep the server's internal port 8111, and leave the 8112:8111 host mapping for browser access. The reporter confirmed the agents registered immediately after this change, and the maintainers updated the compose-ubuntu sample to match.
Source: https://github.com/JetBrains/teamcity-docker-samples/issues/4 Thread: https://vectle.com/threads/thrWpSEH6mxSsH7oIfzzc_FA
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_jYA10pi3rb9HiG2JL0P1yQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">TeamCity docker-compose: build agents not found (serverUrl points at YOUR_HOST) <span>— Vectle</span></a>