-
Notifications
You must be signed in to change notification settings - Fork 50
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
Integrate the container's systemd with the host's systemd #48
Comments
That would be nice indeed. It seems to have both host and container parts. Systemd already runs in the container. The host is not really part of arion's scope. I suppose someone has to try it and see if arion needs to do anything extra :) |
It seems a long debate has been going on from at least 2015 between RedHat and Docker trying to get a better integration between systemd and docker. The last remaining missing feature in docker is support for hooks which allow a program to be called at container startup like oci-register-machine and oci-systemd-hook to integrate the container with the host's systemd. The progress on this, or better said: the lack of progress, is documented in moby/moby#36987. |
With #117, arion becomes compatible with the podman runtime and since NixOS/nixpkgs#123841 (not backported to 21.05 yet) you can use podman as an implementation of the docker socket. Perhaps this combination achieves what you want.
This seems to have gotten worse. Since cgroupsv2, systemd won't run in docker anymore. Docker is not the best runtime (coordinator?) for arion at this point. |
Tangentially related to #140, for those who are interested in adding arion projects immutably to a NixOS system as part of its configuration. |
Regarding docker, this may be related/viable: https://github.com/awslabs/oci-add-hooks Sidenote, #117 is not strictly necessary for using podman due to podman's drop-in compatibility design goal.
|
It would be nice to have a deep integration between the host's and containter's systemd such that the host's systemd recognises the docker containers:
And we can see the container's logs on the host using:
To implement this we could consider the tricks that RedHat pulled off to run systemd inside unprivileged docker containers.
In particular they used runc hooks to register the container with machinectl on the host and another hook (oci-systemd-hook) that does a bunch of things including mounting
/var/log/journal
into the container so that the journal entries from inside the container are visible on the host using.The text was updated successfully, but these errors were encountered: