Build and install Sysbox from sources on Gentoo #742
-
Build and install Sysbox from source on GentooInstalling Sysbox on unsupported distro is not yet detail documented, as it took me a while to make binaries on Gentoo, I share here some personal notes about building Sysbox from source on Gentoo, hoping it can be useful for others or maybe receive some feedback or guidelines. ContextI'm working on polymorphic installless network and system lab all in one images ( see abcd ) where some lab model will be containerized on rootful docker runtime. The whole plateform image itself could be virtualized on HVM hypervisors (KVM, virtulabox, or others) as well on common container runtime (lxd, podman or docker and possibly k8s) in rootless mode. So two virtualization levels are in place, the outer (HVM or rootless container runtime) and the inner level (nested) as rootful docker for Gns3 or Kathara network mockups. When the outer virtualization context is docker we face running rootful docker inside rootless docker environement. In that case Docker and Make filesLike most application or system binaries, Sysbox build is Makefile based, and as stated in #718 Sysbox dev legitimately choose to "build exclusively inside a Docker container (to keep the host clean); however the main reason to have per-distro Dockerfiles is not so much for building, but rather to also test Sysbox inside the container, and the container to mimic the specific distros where Sysbox runs". DockerfilesInspired by the Sysbox Debian-like dockerfiles, the three dockerfiles below are a translation attempt replacing Debian packages by their Gentoo ebuild counterparts. These images are built upon _
Nota : : Building from alternate openrc init base image Nota : Manual docker install inside the image using Nota : Sybox build needs to be run on rootful docker env as some phase are run with
MakefileBefore launching the first
Manual installCopy binariesuse Install systemd unitsFrom Sysbox debian package extract systemd stuff and move it ot accordingly dirs :
Set Docker env aware of SysboxSet Docker env aware of Sysbox using
Nota : Adjust
References |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thank you very much @j-landru for listing out the steps to build and use Sysbox in Gentoo. Regarding
Is that really needed? Normally we use Docker without userns-remap with Sysbox, and Sysbox then generates the containers in the user-namespace (Docker is unaware). |
Beta Was this translation helpful? Give feedback.
Thank you very much @j-landru for listing out the steps to build and use Sysbox in Gentoo.
Regarding
Is that really needed? Normally we use Docker without userns-remap with Sysbox, and Sysbox then generates the containers in the user-namespace (Docker is unaware).