Requirements
- A Docker Desktop on each machine that will host containers with Incredibuild. We recommend that the Docker Desktop not 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).
- 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.
Prepare the Incredibuild Image
To install an Incredibuild Agent used to run builds on a Docker Container, edit your Dockerfile to include the Incredibuild installation script.- Obtain an Incredibuild installer file. For details, see Silent Installation.
-
Edit your Dockerfile as seen in the following example:
Copy
- The example above installs an Agent with the Initiator role. To install an Agent with a Helper role, modify the agentrole parameter as follows: && /agent:agentrole=helper.
- 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