Child pages
  • Docker Integration plugin
Skip to end of metadata
Go to start of metadata

TeamCity Docker integration plugin provides various features which facilitate working with Docker under TeamCity.

Supported environments

So far TeamCity docker support can run on Mac/Linux build agents. It uses 'docker' executable on the build agent machine, so it should be runnable by build agent user. 

Features

Docker client version

Build agent with the plugin registers 'docker.version' property in the format like 1.13.0-49bf474.

Docker support build feature

During the build, docker events will be monitored, and such operations as docker pull, docker run will be detected. After the build, the information about various Docker-related operations is available on a separate Docker Images Info tab.

Docker.Build command runner

A simple helper for building Docker images as a separate build step. Also, during the step when build configuration runners are detected by TeamCity, Docker.Build runner will be offered as an option when Dockerfile is present in the corresponding VCS repository.

Docker Wrapper

For some runners, it is possible to specify a docker image which will be used for running the build step. I.e. the command of the build runner is wrapped in a shell script, and this script is executed inside a docker container with docker run command.

Checkout directory and most build agent directories are mapped inside docker process.

Before starting the actual script, TeamCity runs 'umask 0', thus all files created by the build script will have 'everyone can write' permission set (0777). This mitigates a possible problem when files from docker container are created with 'root' ownership and they cannot be removed by build agent later. 

It is possible to provide extra parameters for docker run command, for instance, provide additional volume mapping.

Currently supported build runners

  • Command line runner
  • Gradle runner
    • Requires java inside docker image in PATH
  • Maven runner
    • Requires java inside docker image in PATH

Docker Disk Space Cleaner

The plugin provides an extension to Free Disk Space build feature which runs "docker system prune -a" command when there is enough disk space at the beginning of the build. The command is run only as the last resort, if all other cleaners did not manage to free enough space.



  • No labels