WARNING: There's a toolbox bug/restriction that prevents boulder from creating sysfs mounts. I've filed an issue on the toolbox tracker, I'll let you know how things evolve.
Toolbx is a podman-based containerized development workspace. It integrates your shell with an environment separated from your host system, so that you can work on your project in, say, home directory, while using tools not exposed in your operating system's root. Containers may even be based on a different operating system than the host.
Ultimately, Toolbx allows us to:
- Separate development and personal scopes
- Install tools that may not be available for your host system (e.g. closed source SDKs only provided in .deb or .rpm)
We'll use Toolbx for SerpentOS development in the first use case.
Create the container
Install Toolbx on your host system. "Toolbx" is a recent rebrand, so you'll likely find it under the name of "toolbox". The command is still named
toolbox as well.
Now let's create a container. We are going to use Arch Linux as image, since its bleeding edge nature integrates well with the SerpentOS codebase requirements. To do that, please write the following content in a new file called
ENV NAME=arch-toolbox VERSION=rolling
LABEL com.github.containers.toolbox="true" \
RUN pacman -Syu --noconfirm \
&& pacman -S sudo --noconfirm \
&& pacman -Scc --noconfirm \
&& echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/toolbox
And build the image with
cat Dockerfile | podman build -t arch-toolbox -.
When the image creation completes successfully, create the container with
toolbox create --image arch-toolbox snekdev. Then, enter the container with
toolbox enter snekdev. (You may want to delete
NOTE: Depending on your host system,
toolbox may require root privileges. If this is the case, prepend every command with
sudo (or the equivalent) until you've entered the container.
Since we're in an Arch container we'll use
pacman to install the dependencies required by the SerpentOS tooling:
sudo pacman -S git pkg-config codespell cmake ldc meson xxhash dub lmdb dfmt
Building the tooling
We're ready to clone git repositories and build them. For the sake of simplicity, we'll create a dedicated
SerpentOS directory, but you're free to store files wherever you want:
mkdir SerpentOS && cd SerpentOS
# this step assumes that you've set up a SSH key in your GH account
git clone firstname.lastname@example.org:serpent-os/onboarding.git
We now have SerpentOS tooling installed system-wide!