Icon

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

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: related to https://youtrack.jetbrains.com/issue/TW-53557

TeamCity-Docker integration  includes  includes the Docker Compose runner.

...

Excerpt

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

The Docker Compose runner supports one or several Docker Compose YAML file(s) with a description of the services to be used during the build. The path to the docker-compose.yml file(s) should be relative to the checkout directory. When specifying several files, separate them with a space.

The executed commands are

Code Block
languagebash
# The commands are executed with the current working directory, where the docker-compose file resides.
docker-compose -f <docker-compose.yml> [-f <docker-compose2.yml>] up -d
# At the end of the build, for each docker compose build step the build agent will run:
docker-compose -f <docker-compose.yml> [-f <docker-compose2.yml>] down -v


 If the checkbox pull image explicitly is enabled, docker-compose pull will be run before the docker-compose up command.

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

Anchor
dockerNetwork
dockerNetwork

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.

 

...