-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements executing the init system #177
base: main
Are you sure you want to change the base?
Conversation
Updated the PR to make this dependent upon the |
Any updates? Is that a viable approach? Would that possibly get merged if the conflicts get resolved? |
Just updated this PR on top of latest master, and removed the recreate command to simplify this PR. I'm using this feature and it works well. |
I'm using containers created by this PR daily and it works really great. |
Perhaps the use-case for running an RDBMs is too high-minded. From toolbox, I just don't want to have to run:
This seems to be able to satisfy the systemd requirements... What's holding up the merge? |
The --init option is available at container creation or recreation. When enabled, a PID namespace is created for the init system to work properly and toolbox shells will not be able to access the host PID namespace.
It ensures that /run is a tmpfs, and in case when systemd is running as init system, systemd will avoid re-mounting it, causing /run/host and other bind-mounts to be shadowed.
When running an init, the dBus socket must point to the toolbox system and not the host.
Just rebased my branch to latest master. If someone can take a look at it, I would be grateful. The change is really light (just replace the sleep by init and change just a few container options : unshare pid namespace, host dbus and mount /run as tmpfs) |
This is necessary when the pid namespace is unshared because the PID is not the same inside and out of the container.
Sorry, this is no longer working with the newer version. And having journald mounted from within the container does not work. |
Progress? |
Add the toolbox recreate sub command
The recreate command is saving the current container as a new image, removing the container, and recreating a new container with all the updated options.
Implements debarshiray/toolbox#143
Allow to run systemd within the container
debarshiray/toolbox#176
Add an
--init
option to create or recreate a container with a split PID namespace. In such circumstances, the/sbin/init
is executed instead ofsleep
. Toolbox shells are then able to access systemd usingsystemctl
.