Systemd will simply not run unless it has access to cgroups, udev and a bunch of others. It will not run in a chroot or in a docker container (unless the container is give unlimited privileges).
It will run in podman, which is not a surprise seeing as the same company stands behind that and systemd. The fact systemd tries to do everything is also concerning to linux altogether. It is an init system, but wait, it also uses journald and is now a logging system. And that listens on /dev/log, so you cannot use rsyslog with local sockets. Oh, and now it's a timesyncd daemon as well, and so forth.
So anyways, I am also fed up with docker saying "that is not the docker way, one container, one service, one entrypoint". But hold on, with chroot environments, and then with LXC containers, we were able to run an init system and use containers like mini-servers if we wished so, since forever. Systemd simply doesn't let you, unless you give it a lot of permissions on docker or use podman. And docker is adamant you should not be running a multi-service init system inside containers, even though they are full linux containers.
So, anyways, this is not just a rant. I have a solution - I did a thing!
https://github.com/rglonek/docker-systemd/blob/main/QUICKSTART.md
It's a golang-written application, which allows you to put in a single binary in your docker container and run it. It loads itself and acts as systemd/journald and provides systemctl/journalctl commands. Essentially I have rewritten the important parts of systemd/journald in go :D Yes, this is a beta, yes the code is a proof-of-concept. And yes, I've been using it since I built it and it works, at least for me, without issues.
It supports most standard systemctl commands (start/stop/restart/status/etc) though output looks more basic, most standard journalctl parameters and handles the loading of services at system startup (looks up the multi-user.target). It understands and speaks systemd system files, so you can install say apache2, and do systemctl start apache2; journalctl -u apache2 -f
and systemctl enable apache2
to make it start at system boot.
I needed it cause some stuff I am installing is badly packaged and tries to run systemctl commands on install (and fails) in docker. And I like running say a process and it's little other process-helper thing in the same container. It's linux, I should be allowed to if I choose so.