'Unable to start TeamCity Build agent on Docker

I'm trying to create a TeamCity build agent on docker. i pulled the official image and tried to start it with default configurations with below command

docker run -d --name teamcity-agent -e SERVER_URL="http://teamcity-server-instance:80" -v /opt/docker/teamCity/teamcity_agent/conf:/data/teamcity_agent/conf jetbrains/teamcity-agent

but it exits with code 1 every time i run it and below are the logs for that enter image description here

can anyone suggest a solution to this

Thank you in advance



Solution 1:[1]

Did you try changing the mod? sudo chmod 666 /opt/docker. This gives the File owner, The group members, and others read + write permission over that directory.

you can check the permissions you have via: ls -la /opt

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1