Public Repository

Last pushed: 6 days ago
Short Description
TeamCity Minimal Build Agent
Full Description

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.

Image Tags

All default tags in docker images refers to the Linux images. Windows docker images have suffixes -windowsservercore and -nanoserver:

  • jetbrains/teamcity-minimal-agent, jetbrains/teamcity-minimal-agent:latest (ubuntu)
  • jetbrains/teamcity-minimal-agent:latest-windowsservercore, jetbrains/teamcity-minimal-agent:latest-windowsservercore-ltsc2016 (windowsservercore ltsc2016)
  • jetbrains/teamcity-minimal-agent:latest-nanoserver, jetbrains/teamcity-minimal-agent:latest-nanoserver-sac2016 (nanoserver sac2016)
  • jetbrains/teamcity-minimal-agent:latest-windowsservercore-1709 (windowsservercore 1709)
  • jetbrains/teamcity-minimal-agent:latest-nanoserver-1709 (nanoserver 1709)

Current Status

Experimental image, feedback is welcome.

How to Use This Image

Pull TeamCity minimal image from the Docker Hub Repository

jetbrains/teamcity-minimal-agent and

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  \      

or Windows container:

docker run -it -e SERVER_URL="<url to TeamCity server>" 
    -v <path to agent config folder>:C:/BuildAgent/conf      

<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>


The image is available under the TeamCity license.
TeamCity is free for perpetual use with the limitation of 20 build configurations (jobs) and 3 agents. Licensing details.


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 161, 64 bit
  • curl, unzip (Linux)


The image is based on JRE 8 Update 161 with limited Java tool set available due to Oracle license policy. If you would need Java diagnostics tools, install JDK 8 Update 161, 64 bit into the container over the existing Java installation.

Other TeamCity Images

Dockerfile source

Docker Pull Command