Configuring Incredibuild for Use with Docker

You can install Incredibuild on a machine with Docker containers. Incredibuild must be installed on the host machine (not inside a container), and can then be used by any container on that machine. This is generally designed for Initiator machines.

Incredibuild respects the restrictions of the Docker container and does not use resources such as CPU cores from the host machine that are not assigned to the container. To ensure that these boundaries are respected, use the switch --max-local-cores when running builds using ib_console in Docker containers.

To allow Incredibuild to use all resources on the host machine of a Docker container, use the switch --no-cgroups and do not use the --max-local-cores switch.

How to Use

Replace the command docker with ib_docker when running a build. Also, use the ib_console build command when relevant. The -j number should also be increased in comparison to regular builds.

For example, if a normal build looks like this:

sudo  docker run -i -t  -v /etc/passwd:/etc/passwd -v /etc/group:/etc/group -u 1000:1000 -v /home/xoreax/linux-2.6.34.14/:/home/xoreax/linux-2.6.34.14/  -w /home/xoreax/linux-2.6.34.14  1d070b96eb09 make -j 20

With Incredibuild, you would run it like this:

sudo /opt/incredibuild/bin/ib_docker run -i -t  -v /etc/passwd:/etc/passwd -v /etc/group:/etc/group -u 1000:1000 -v /home/xoreax/linux-2.6.34.14/:/home/xoreax/linux-2.6.34.14/  -w /home/xoreax/linux-2.6.34.14  1d070b96eb09 ib_console --max-local-cores=6 make -j 80