Earlier quoted context omitted.
I was thinking similarly. All of those steps to circumvent the OCI image infrastructure just to use systemd…
OCI is for running prepackaged software in black boxes from the internet, where you have no interest or ownership of the container internals. Most of my containers are not like that. Well, actually none are. systemd-nspawn is for running your own containers, with a VM-like usage pattern (ie not immutable), deployed as part of your overall systemd based infrastructure for when the thing you need to manage is "too big"…
On Running systemd-nspawn Containers (2022)
31–40 of 59 posts
Re: On Running systemd-nspawn Containers (2022)
#32Earlier quoted context omitted.
hmm this is very interesting. I am wondering though? Is there something like systemd-nspawn that doesn't require root?
If file system level isolation is enough for you, take a loot at schroot ( https://linux.die.net/man/1/schroot ) which allows root-less chroot. You can use something like debootstrap to get a complete userland into a user controlled directory and use schroot to chroot into it without root level access.
But is there a way to also run OCI compatible directly on this as well?
Re: On Running systemd-nspawn Containers (2022)
#33Earlier quoted context omitted.
hmm this is very interesting. I am wondering though? Is there something like systemd-nspawn that doesn't require root?
If file system level isolation is enough for you, take a loot at schroot ( https://linux.die.net/man/1/schroot ) which allows root-less chroot. You can use something like debootstrap to get a complete userland into a user controlled directory and use schroot to chroot into it without root level access.
I don't have root on that system and so I can't create a chroot , there is fakeroot but it doesn't work since it uses qemu on that locked system.
Are there any other alternatives
Re: On Running systemd-nspawn Containers (2022)
#34Earlier quoted context omitted.
If file system level isolation is enough for you, take a loot at schroot ( https://linux.die.net/man/1/schroot ) which allows root-less chroot. You can use something like debootstrap to get a complete userland into a user controlled directory and use schroot to chroot into it without root level access.
this is crazy , trying this out right now. But is there a way to also run OCI compatible directly on this as well?
Re: On Running systemd-nspawn Containers (2022)
#35Earlier quoted context omitted.
If file system level isolation is enough for you, take a loot at schroot ( https://linux.die.net/man/1/schroot ) which allows root-less chroot. You can use something like debootstrap to get a complete userland into a user controlled directory and use schroot to chroot into it without root level access.
EDIT: it seems that for creating a chroot you still require root. I don't have root on that system and so I can't create a chroot , there is fakeroot but it doesn't work since it uses qemu on that locked system. Are there any other alternatives
Re: On Running systemd-nspawn Containers (2022)
#36Earlier quoted context omitted.
hmm this is very interesting. I am wondering though? Is there something like systemd-nspawn that doesn't require root?
all containers require root. docker and the rootless nonsense is just root daemons and suid. ...would never have believed marketing lies would reach linux tools if anyone told me this before 2018.
There's also https://github.com/termux/proot-distro which may or may not count as containers depending on how you define the word but I think it does count
Re: On Running systemd-nspawn Containers (2022)
#37Also I'm a little unclear on the security implications of "--private-users=id". Yes the user IDs are the same, but it is technically running in a separate user namespace. In terms of security is this mode equivalent to privileged containers, or is it safer?
Re: On Running systemd-nspawn Containers (2022)
#38Earlier quoted context omitted.
If file system level isolation is enough for you, take a loot at schroot ( https://linux.die.net/man/1/schroot ) which allows root-less chroot. You can use something like debootstrap to get a complete userland into a user controlled directory and use schroot to chroot into it without root level access.
EDIT: it seems that for creating a chroot you still require root. I don't have root on that system and so I can't create a chroot , there is fakeroot but it doesn't work since it uses qemu on that locked system. Are there any other alternatives
Re: On Running systemd-nspawn Containers (2022)
#39As Brendan Gregg said: "Containers are just processes, cgroups, and namespaces."