Unable to start teamcity agent using docker container
Hi, I have this issue when trying to run the teamcity agent with the docker image.
user@host:/$ sudo docker run -e SERVER_URL="teamcity.***.***.com" -v /opt/docker/teamcity/data/teamcity_agent/conf/:/data/teamcity_agent/conf jetbrains/teamcity-agent
/run-services.sh
/services/run-docker.sh
/run-agent.sh
Will create new buildAgent.properties using distributive
TeamCity URL is provided: teamcity.***.***.com
Will prepare agent config
cp: cannot create regular file '/data/teamcity_agent/conf/buildAgent.dist.properties': Permission denied
cp: cannot create regular file '/data/teamcity_agent/conf/buildAgent.properties': Permission denied
cp: cannot create regular file '/data/teamcity_agent/conf/log4j.dtd': Permission denied
cp: cannot create regular file '/data/teamcity_agent/conf/teamcity-agent-log4j2.xml': Permission denied
I've tried a couple things like chmod on that /opt/docker directory. But I just can't get around this issue. Any help would be appreciated.
Please sign in to leave a comment.
Please take a look at the related note in the documentation: https://www.jetbrains.com/help/teamcity/upgrade-notes.html#Agent+Docker+images+run+under+non-root+user
It contains troubleshooting steps and possible workarounds for this issue. Please let me know if you have additional questions.
Best regards,
Anton