hadean run
command are always run in a sandboxed environment. By default, the user application is run in an environment where you have a minimal set of Ubuntu 20.04 packages. This enviornment is specified by what we call a runtime bundle, which can be found in ~/.hadean/sdk/bin/hadeanos/runtime-bundle.tar.xz
. In this guide we will be looking at creating a new runtime environment, for those cases where the build environment is not compatible with the default runtime environment, or if we want to have extra packages installed by default.qcow2
format which is not supported by the Hadean Platform. Instead we need to generate a tarball that contains the root of our filesystem. We also want to modify the image to include our own packages. There are multiple ways in which this can be done, and in this guide we will be looking at one way of doing it.qcow2
, but for other OSes (such as Ubuntu) you can download the sysroot directly, which means you can skip the "Converting a qcow2 image" section.qcow2
image to a tarballnsjail
to install extra packages into the image.wget
libguestfs-tools
qcow2
image if you wish to do so.nsjail
nsjail
to install packages. There are other ways this can be done, for example by running the qcow2
image under QEMU, installing your dependencies, and then generating the tarball. In this guide we are going for a more scriptable approach. We ship nsjail
with the Hadean SDK, and you can find it in ~/.hadean/sdk/bin/hadeanos/nsjail
.dnf -y install gdb-gdbserver && dnf clean all
in our image. You can install other packages, or libraries if you wish to do so.gdbserver
. Without it you won't be able to debug your Hadean applications!hadean run
.nsjail
to modify it.