起因
目的:为了记录过程的实际问题
记录解决办法:
问题1:docker 不兼容若问题 Incompatible agents
出问题描述:
代理无非自动识别 docker 版本和容器
teamcity-agent出现无法检测到docker版本
网上的解决方案2类,启动root权限
image.png
问题原因
因为run 报错,增加了-v 实际
-v /usr/bin/docker:/usr/bin/docker
image.png
调整后截图
image.png问题2 继续解决
问题1就是:
https://stackoverflow.com/questions/46804048/running-docker-when-using-teamcity-docker-agent-permission-denied
引起的
TMD 死循环了
https://hub.docker.com/r/jetbrains/teamcity-agent/
问题解决:太不认真了 浪费这老长时间
docker run -it -u root -d --name teamcity-agent -e SERVER_URL=http://192.168.1.161:6086/ --link teamcity-server-instance:teamcity-server-instance -p 6087:9090 -v /home/teamcity/agent/conf:/data/teamcity_agent/conf -v /var/run/docker.sock:/var/run/docker.sock -v /opt/buildagent/work:/opt/buildagent/work -v /opt/buildagent/temp:/opt/buildagent/temp -v /opt/buildagent/tools:/opt/buildagent/tools -v /opt/buildagent/plugins:/opt/buildagent/plugins -v /opt/buildagent/system:/opt/buildagent/system jetbrains/teamcity-agent
错误
docker run -it -u root -d --name teamcity-agent -e SERVER_URL=http://192.168.1.161:6086/ --link teamcity-server-instance:teamcity-server-instance -p 6087:9090 -v /home/teamcity/agent/conf:/data/teamcity_agent/conf -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v /home/teamcity/buildagent/work:/opt/buildagent/work -v /home/teamcity/buildagent/temp:/opt/buildagent/temp -v /home/teamcity/buildagent/tools:/opt/buildagent/tools -v /home/teamcity/buildagent/plugins:/opt/buildagent/plugins -v /opt/teamcity/buildagent/system:/opt/buildagent/system jetbrains/teamcity-agent
网友评论