Although it is very easy to create a systemd container with EOS, I decided to offer a prebuilt minimal container that can be imported into your system with a single command.
The container will be installed in the default location which is
If that directory is on a BTRFS filesystem, a subvolume with the machine will be created.
To install quick&fast:
sudo machinectl pull-tar --verify=checksum https://github.com/torvic9/eos-systemd-container/raw/master/eos-container.tar.xz
Optionally, to bind-mount your pacman cache read-only:
sudo cp /var/lib/machines/eos-container/eos-container.nspawn /etc/systemd/nspawn
To boot the container:
sudo machinectl start eos-container
To login into the container:
sudo machinectl login eos-container
sudo systemd-nspawn -bUM eos-container
It comes with a preconfigured user account:
eos1 (same as for root)
To bind-mount other directories from the host, edit
Feedback is welcome!
EDIT: you can also use this container on a different distro as long as it runs systemd. It’s not EndeavourOS specific.
Your post totally introduced me to this concept. I’ve been using docker containers for a good while now, didn’t realize systemd has something comparable.
What are some use cases for this vs docker?
I have no clue about Docker never seriously used it.
As for use cases, it can be used to build packages in a clean environment, or simply as a testbed, if you want to try out “dangerous” things.
It’s a powerful tool, supports cloning, ephemeral boot (i.e. changes will be lost on shutdown), resource management, can be started on host boot automatically, also has SSH support if I remember correctly.
The cool thing is that it is available OOTB on every EndeavourOS installation as part of systemd.
podman can work even better as it can pretty easily run “rootless”; it’s almost a drop-in replacement for
Not quite “rootless”, but: https://wiki.archlinux.org/index.php/Systemd-nspawn#Using_machinectl_without_root_permissions
(But completely without root is not possible with systemd I think.)
Oops! That page doesn’t exist or is private.
(Yet another Arch/Manjaro based distro, this time by Librewish? The girls also have moved over there it seems )
Nope, sorry, I think you have to be a member to access some categories.
Good to know, thanks. Plasmafox 2.0
Avatar are top secrewt
Thanks! However I do feel like the time of Plasmafox is up soon… I’m starting to lose interest and it is very time consuming especially when you don’t know what you’re doing
I change the settings, could you please test again the link above.