Icon

You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in TeamCity 2018.1 documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 
Skip to end of metadata
Go to start of metadata

Starting from TeamCity 2017.2, TeamCity comes with built-in Docker integration, which includes the Docker Compose runner.

Requirements

Icon

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. 

Icon
  • 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 error is reported in this case. 
  • On MacOS, the official Docker support for Mac should be installed for the user running the build agent.

Docker Compose

The runner allows starting Docker Compose build services and shutting down those services at the end of the build.

Docker Compose YAML file with a description of the services to be used during the build is required. The path to the docker-compose.yml file should be relative to the checkout directory

The executed commands are

 

When using Docker Compose with images which support HEALTHCHECK, TeamCity will wait for the healthy status of all containers, which support this parameter.

If the start of Docker Compose was successful, the TeamCity agent will register the TEAMCITY_DOCKER_NETWORK environment variable containing the name of the Docker Compose default network. This network will be passed transparently to the Docker Wrapper when used in some build runners. 

 













  • No labels

5 Comments

  1. Are there any plans to support the docker-compose build command?

    1. Hello,

      So far it looks quite simple to use Command-line runner for that. I.e. you can run docker-compose build command from this runner.

      If you think TeamCity can help you somehow further, please add a corresponding issue with description to our tracker: https://youtrack.jetbrains.com/newIssue?project=TW&clearDraft=true&c=tag+docker-plugin

      Thanks!

  2. Is it possible to use multiple .yml files using the Docker Compose runner (i.e. a docker-compose.override.yml file)? Currently it looks as though only one file is allowed. Using a comma or otherwise delimited list causes the runner to think it's one file with a giant filename. 

    1. Hello Neal,

         Multiple files are not supported yet. Please vote for https://youtrack.jetbrains.com/issue/TW-53855

         Thanks!

      1. How do we go about using a docker-compose.yml and docker-compose.override.yml ?