1.5 KiB
Docker Build
Docker can be used to run the build inside a container. This is useful on non-Debian hosts (e.g. Fedora, Arch, macOS with Linux VM) or to keep the build environment isolated from the host system.
Note
: The Docker build is not fully isolated — it still needs kernel-level access for
binfmt_misc(ARM emulation) andlosetup(loop devices for.imgbuilds).
Building
cp config.example config # edit as needed
./build-docker.sh
Output will be in deploy/.
Continuing After a Failure
Edit the failing script, then resume without restarting from scratch:
CONTINUE=1 ./build-docker.sh
Inspecting the Container After a Failure
sudo docker run -it --privileged --volumes-from=pigen_work chillcraftos-build /bin/bash
Preserving the Container Between Runs
By default the container is removed after a successful build. To keep it for incremental development:
PRESERVE_CONTAINER=1 ./build-docker.sh
Passing Extra Docker Arguments
Use PIGEN_DOCKER_OPTS to pass additional flags to docker run:
PIGEN_DOCKER_OPTS="--add-host myrepo:192.168.1.10" ./build-docker.sh
The --name and --privileged flags are already set by the script and should not be redefined.
binfmt_misc on Docker Hosts
If building ARM images, binfmt_misc must be enabled on the host kernel before starting the build:
sudo apt-get install binfmt-support qemu-user-static
sudo update-binfmts --enable