Docker and Other Containers

You can install Incredibuild on a machine with containers such as Docker, Podman, and LXC. 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.

Note: To install Incredibuild on Kubernetes, see Kubernetes.

Incredibuild respects the restrictions of the containers 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 containers.

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

How to Use

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

For example, if your docker command looks like this:

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:

/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