TeamCity Minimal Build Agent
This is an official JetBrains TeamCity minimal build agent image.
TeamCity build agent connects to the TeamCity server and spawns the actual build processes.
You can use
jetbrains/teamcity-server image to run TeamCity server.
This minimal image adds just TeamCity agent without any tools like VCS clients, etc. It is suitable for simple builds and can serve as a base for your custom images. For Java or .NET development we recommend to use default build agent image jetbrains/teamcity-agent.
All default tags in docker images refers to the Linux images. Windows docker images have suffixes
Experimental image, feedback is welcome.
How to Use This Image
Pull TeamCity minimal image from the Docker Hub Repository
use the following command to start a container with TeamCity agent running inside Linux container:
docker run -it -e SERVER_URL="<url to TeamCity server>" \ -v <path to agent config folder>:/data/teamcity_agent/conf \ jetbrains/teamcity-minimal-agent
or Windows container:
docker run -it -e SERVER_URL="<url to TeamCity server>" -v <path to agent config folder>:C:/BuildAgent/conf jetbrains/teamcity-minimal-agent:latest-nanoserver
<url to TeamCity server> - is full URL for TeamCity server, accessible by the agent. Note that "localhost" will not generally not work as that will refer to the "localhost" inside the container.
<path to agent config folder> - is the host machine directory to serve as TeamCity agent config directory. We recommend to provide this binding in order to persist agent configuration, e.g. authorization on the server. Please note that you should map a different folder for every new agent you create.
You can also provide your agent's name using -e AGENT_NAME="<agent name>". If this variable is omitted the name for the agent will be generated automatically by the server.
When you run the agent for the first time you should authorize it via TeamCity server UI - go to the Unauthorized Agents page in your browser. See more details.
All information about agent authorization is stored in agent's configuration folder. If you stop the container with the agent and then start a new one with the same config folder - the agent's name and authorization state will be preserved.
TeamCity agent does not need manual upgrade: it will upgrade itself automatically on connection to an upgraded server.
Windows Containers Limitations
Details about known problems in Windows containers are available on the Known Issues page.
You can customize the image usual Docker procedure:
Run the image
docker run -it -e SERVER_URL="<url to TeamCity server>" \ -v <path to agent config folder>:/data/teamcity_agent/conf \ --name="my-customized-agent" \ jetbrains/teamcity-minimal-agent \
enter into the container
docker exec -it my-customized-agent bash
and change whatever you need. Then exit and create new image from the container
docker commit my-customized-agent <the registry where you what to store the image>
Report issues of suggestions into official TeamCity issue tracker.
Under The Hood
This image is built on top of TeamCity base image which includes:
- ubuntu:xenial (Linux)
- microsoft/windowsservercore or microsoft/nanoserver (Windows)
- Oracle JRE 8 Update 131, 64 bit
- curl, unzip (Linux)
The image is based on JRE 8 Update 131 with limited Java tool set available due to Oracle license policy. If you would need Java diagnostics tools, install JDK 8 Update 131, 64 bit into the container over the existing Java installation.
Other TeamCity Images
On closer inspection it seems to be because the kernel version in the container is 4.4.15-moby, instead of 4.4.0-*-generic.
Hi. Would it be possible to change this so that it builds on Ubuntu Xenial 16.04 instead? I'm trying to launch build containers from this container (by sharing the docker.sock) but having trouble since Wily 15.10 seems to have flaky support for the aufs driver, which works fine in Xenial 16.04.