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.-
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.
-
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.
-
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.
- Obtain an Incredibuild installer file. For details, see Silent Installation.
- Edit your Dockerfile as seen in the following example:
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. - 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
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 thedocker 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