Add an `--inject-path` option to map host files into the chroot
Before raising this MR, consider whether the following are required, and complete if so:
-
Unit tests -
Metrics -
Documentation update(s)
If not required, please explain in brief why not.
Description
This MR adds a new --inject-path
option, which takes a string of the form HOST_PATH:CHROOT_PATH
. This option can be specified multiple times, and is used to specify a set of files or directories to inject into the chroot at construction time. This allows a way to put host-specific config files or tooling into the chroot at a known location.
This MR also updates the Dockerfile
to actually be usable, and adds a docker-compose.yml
to allow easy testing of buildbox-run-userchroot changes.
It also has a fix for a confusing bug where a missing userchroot
binary would lead to an error message of "Failed to install devices", caused by checking that we successfully resolved the binary path after attempting to call it to install devices.