RunInDockerBuildFeature
Runs all build steps of a configuration in the specified container. Steps that cannot run inside the container are executed outside of it. If the image registry requires authorization, enable the Docker Registry Connections build feature.
Example.
buildType {
name = "Build in Docker"
features {
runInDocker {
dockerImage = "busybox"
}
}
steps {
script {
scriptContent = "echo this step is running inside the container"
}
script {
scriptContent = "echo and this step is running in the same container""
}
}
}
See also
Properties
Image name to use for running build steps, for example, "ubuntu:latest". The image will be pulled via "docker pull" or "podman pull" commands, depending on which container manager is installed on the agent that runs the build.
Select a specific image OS platform. Limits the pool of compatible agents to those running on this platform.
If enabled, TeamCity will explicitly pull the target image every time the build is about to start.
Additional arguments passed to "docker run" command.
Functions
Copies parameters of this object to the specified target
Creates an instance of this build feature via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.
Validates this object and reports found errors to the provided consumer