TeamCity is a Java-based build management and continuous integration server from JetBrains.
$ docker run --name teamcity-agent -p 9090:9090 -e SERVER_URL=http://example.com -d exira/teamcity-agent:5
This will start a Teamcity agent listening on the default port of 9090.
SERVER_URL environment variable is required. Otherwize container will exit with exit code 1.
If agent wont be able to connect to teamcity server at SERVER_URL within 180 seconds, it will exit with exit code 2.
Required:
SERVER_URLOptional environment variables:
AGENT_OWN_ADDRESSAGENT_OWN_PORT (if you set this variable, you must rebuild image with this environment variable set)AGENT_NAMEAGENT_DIR - directory where agent sources live. Default: /opt/teamcity_agentAGENT_WORKDIR Default: $AGENT_DIR"/work_dir"AGENT_TEMPDIR Default: $AGENT_DIR"/temp_dir"Documentation about agent parameters: official teamcity docs
By default, when running this image, you will get a basic container with only running agent in it and pre-installed git.
If you would like to do additional initialization in container, add one or more *.sh scripts under /agent-init.d/. After agent installs, script will source any *.sh scripts found in that directory to do further initialization before starting the service.
For example, you can mount such scripts as -v /path/script.sh:/agent-init.d/script.sh.
If you want to be able to build, run, compose docker in builds running by agent container, there are good news for you: this image has a pre-installed docker client.
All you must to do is to mount your host's docker socket via -v /var/run/docker.sock:/var/run/docker.sock. And you will be able to use your hosts docker engine!
Using host's docker-compose: -v /usr/local/bin/docker-compose:/bin/docker-compose
Using host's docker-machine: -v /usr/local/bin/docker-machine:/bin/docker-machine
Content type
Image
Digest
Size
152 MB
Last updated
about 10 years ago
docker pull exira/teamcity-agent