teamcity-docker-minimal-agent icon indicating copy to clipboard operation
teamcity-docker-minimal-agent copied to clipboard

agent.sh doesn't find findJava.sh

Open Sushisource opened this issue 6 years ago • 1 comments

This is using the agent zip from 2017.1.2 - I'm using this Dockerfile with only some really minor modifications to add a few other requirements.

As fair as I can tell, this is simply because the agent.sh script tries to source findJava.sh as if it's guaranteed to be in the working directory, but that's not the case from this image.

[ec2-user@ip-10-176-72-238 dockerized-tc-agents]$ docker logs docker_tcagent_1
/run-services.sh
/run-agent.sh
Will create new buildAgent.properties using distributive
TeamCity URL is provided: http://betateamcityaws
Will prepare agent config
run agent.sh configure --server-url http://betateamcityaws --name ip-10-176-72-238_docker_tcagent_1
/opt/buildagent/bin/agent.sh: 142: .: findJava.sh: not found
Error! Stopping the script.

Indeed, it's fixable by chaging the line in agent.sh that calls findjava from

. findJava.sh

to

. ./findJava.sh

So I suppose this is really more of an issue with the agent bundle than this image

Sushisource avatar Jan 17 '18 21:01 Sushisource