Skip to end of metadata
Go to start of metadata
Icon

This feature is currently in development and may change in future.

Starting from TeamCity 2017.2, TeamCity comes with built-in Docker integration, which includes the Docker Build 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.

The runner allows building Docker images as a separate build step. When creating TeamCity projects/ build configurations from a repository URL, the runner is offered as build step during auto-detection, provided a Dockerfile is present in the VCS repository.

Docker Build Parameters

 

Setting

Description

Dockerfile source

Depending on the selected source, the settings below will vary. The available options include File, a URL or File content.

Path to file

Available if File is selected as the source. Specify the path to the Docker file. The path should be relative to the checkout directory.

Context folderAvailable if File is selected as the source. Specify the context for the docker build. If blank, the enclosing folder for Dockerfile will be used.

URL to file
Available if URL is selected as the source. The URL can refer to three kinds of resources: Git repositories, pre-packaged tarball contexts, and plain text files. See Docker documentation for details.
File Content:Available if the file content is selected as the source. You can enter the content of the Dockerfile into the field.
Name:tag(s)

Provide a newline-separated list of image name:tag(s)

Additional arguments for 'build' commandSupply additional arguments to the docker build command. See Docker documentation for details.
 

 

 

  • No labels