Skip to main content
Last updated on Mar 08, 2023 You can use Docker containers to launch and run Incredibuild Helper and Initiator Agents. Docker technology allows you to create multiple containers on a single host, and therefore allows you to use one powerful machine to provide multiple users with Helper agents. Installing agents on containers also provides you a greater flexibility in starting, stopping, removing, and re-launching Agents. With a few commands, you can set up and manage your containerized Agents across your entire Incredibuild Environment.

Requirements

  • A Docker Desktop on each machine that will host containers with Incredibuild. The Docker Desktop cannot be on a virtual machine.
  • An Incredibuild Coordinator with floating licenses (helper and/or initiator) that will be automatically assigned and unassigned to the Agents you create.
  • Verify that you can run builds without Incredibuild in your Docker environment before launching containers with Incredibuild images.
  • The Docker Desktops must be set to Windows Containers (by default it is set to run Linux containers).

Download and Prepare the Incredibuild Image on Docker

The Incredibuild images contain the windows server core 2022 operating system, the Incredibuild installer, and the Incredibuild initialization script. They include an Incredibuild Agent with a license and different roles depending on the image you use.
  1. Download an Incredibuild Image To download one of the Incredibuild images, use the following command:
    Where:
    • <role> is the role or roles that will be assigned to the Incredibuild Agent [helper, initiator, both].
    • <version> must be 10.2.1.
    For example:
  2. Modify the Incredibuild Image (for Initiator Agents) If you want to use a Container as an Initiator you need to create a modified Dockerfile based on the Incredibuild Initiator image, and add any build tools and files required to run the build to that container.
    Build the image using the docker build command.
  3. Creating a custom Incredibuild Image (optional) The Incredibuild installer is included in the Incredibuild image. However, if you already have a Dockerfile and want to manually add the Incredibuild installer to your image, use the following procedure.
    1. Obtain an Incredibuild installer file. For details, see Silent Installation.
    2. Edit your Dockerfile as seen in the following example:
    Copy
    Note: Containerised Agents cannot run on Microsoft Nano Server OS, since this OS can run only 64-bit based applications, and a part of IncrediBuild’s applications are 32-bit based.
  4. You can now launch containers using the Incredibuild images as described below.

Launch a Container using the Incredibuild Image

To launch a container, use the following command: Copy
Where: The containerized Agent names are based on the container ID and hostname. If you want to give a meaningful name to a containerized Agent, use the --hostname Docker option to specify an internal hostname for your container, which will be manifested in the containerized Agent name.

Advanced Options

Adding Standard Docker Options to Incredibuild Docker Run Command

You can use standard options of the docker run command, as part of the Incredibuild container creation docker run command. For a detailed list of available docker run options, see: https://docs.docker.com/engine/reference/run/ In Incredibuild container creation command, add the standard Docker option BETWEEN the docker run command and the specified Incredibuild image. For example, if you want to automatically clean up the container and remove its file system when it exits, use the --rm command as follows: Copy

Initializing Additional Processes during Container Launch

You can initialize additional process when an Incredibuild container is launched such as building a solution, running a script, or starting a server. You can only add one additional process to Incredibuild docker run command. If you want to initialize multiple processes upon the Incredibuild container launch, use a script to bundle these processes. In Incredibuild docker run command, add the initialization command and arguments of the additional process AFTER the specified Incredibuild image. For example: Copy

Unassigning Licenses from Docker Agents

If you stop, remove, or terminate an Incredibuild container, the license that was assigned to the containerized Agent is not automatically unassigned unless it is a floating license. If you want to unassign a license that was assigned to an Agent in a Docker container, you need to manually Unassign it. For more details, see Managing Licenses https://docs.incredibuild.com/Default.htm https://docs.incredibuild.com/lin/latest/Default.htm https://docs.incredibuild.com/win/v10_2_2/Default.htm https://docs.incredibuild.com/cloud/Default.htm Windowshttps://www.incredibuild.com/ 10.2.2