SystemD in a Jail

This is a serious post so serious replies only please.

I'd like to run a Linux userland inside a jail. Nothing new there. The more popular Linux distros use SystemD. What would it take to run a SystemD userland inside a jail?

My guesses are:

1. Linuxulator adds / extends its API to support SystemD.
2. Substitute a fake SystemD that makes userland happy.
3. A combination of the above.

One such API is systemd-nspawn(1).

The goal is a happy path that satisfies the most common use cases for compatibility. This may be a pipe dream where running bhyve inside a jail is a much better (but more resource taxing) solution.
 
From what I can see, at least with Ubuntu Bionic the `service` command works just fine without systemd, so if you want things to get started automatically it should be a matter of a trivial shell script to run as init for the Linux jail.
 
Back
Top