For TeamCity 2017.1.x Docker Support is available as a separate plugin supporting build agents on Mac and Linux. See the related blog-post.
TeamCity 2017.2 comes with built-in Docker support. If you installed the plugin for the previous version manually, please remove it.
note
The integration requires Docker installed on the build agents. Docker Compose also needs to be installed to use the Docker Compose build runner.
Supported Environments
For TeamCity 2017.2.x TeamCity-Docker support can run on Mac, Linux, and Windows build agents. It uses the 'docker' executable on the build agent machine, so it should be runnable by the build agent user.
note
On Linux, the integration will run if the installed Docker is detected.
On Windows, the integration works in the Windows container mode only. Docker on Windows with the Linux container mode enabled is not supported, an erroris reported in this case.
On MacOS, the official Docker support for Mac should be installed for the user running the build agent.
Parameters Reported by Agent
During the build, the build agent reports the following parameters:
Parameter
Description
docker.version
The Docker Engine version
dockerCompose.version
The Docker Compose file version if the Docker Compose build step is used
docker.server.osType
The Docker server OS type, can have the linux or windows value
If you are using the Command Line Build step (and not the TeamCity-provided docker steps), these parameters can be used as agent requirements to ensure your build is run only on the agents with Docker installed.
Features
TeamСity-Docker integration provides the following features which facilitate working with Docker under TeamCity:
Docker Support Build Feature
Docker Connection for a Project
Docker Build Runner
Docker Compose Runner
Docker Wrapper
TeamCity provides the Docker Wrapper extension for Command Line,Maven, Ant, and Gradle runners. Each of the supported runners has the dedicated Docker settings section.
Docker Settings
Docker Disk Space Cleaner
When there is not enough disk space on the agent at the beginning of the build, the docker system prune -a command will be run cleaning the local Docker Caches. The command is run only as the last resort if all other cleaners did not manage to free enough space. Docker Disk Space Cleaner is an extension to the Free Disk Space build feature ensuring a certain amount of disk space for a build.