Although we don't expect anyone to run pre-init in a container in production (systemd is the init system for that, pre-init is not supposed to be a new init implementation), it's useful for testing, some examples of initful containers are here:
you may have to add some if (container) cases in pre-init to check for things that are or are not necessary in a container.
You will have to manually extract a initramfs to a tmpfs to fake the:
initramfs -> initoverlayfs -> rootfs
transition.
We may not be able do all tasks pre-init normally does in a container, we can "if" around that, it's still useful for quick throwaway environments to test subsections of the code.
Although we don't expect anyone to run pre-init in a container in production (systemd is the init system for that, pre-init is not supposed to be a new init implementation), it's useful for testing, some examples of initful containers are here:
https://gitlab.com/CentOS/automotive/container-images/
you may have to add some
if (container)
cases in pre-init to check for things that are or are not necessary in a container.You will have to manually extract a initramfs to a tmpfs to fake the:
initramfs -> initoverlayfs -> rootfs
transition.
We may not be able do all tasks pre-init normally does in a container, we can "if" around that, it's still useful for quick throwaway environments to test subsections of the code.