Podman supports systemd support out of the box. Here are 4 examples using Fedora, RedHat, Oracle and OpenSUSE based images.
The container_manage_cgroup boolean must be enabled for this to be allowed on an SELinux separated system.
sudo setsebool -P container_manage_cgroup true
RUN curl -fsSL https://api.github.com/users/${USERNAME}/keys | jq --raw-output '.[] | .key' > /tmp/authorized_keys &&\
chmod 600 /tmp/authorized_keys
podman build --tag systemd \
--build-arg BASEIMAGE=docker.io/fedora:35 \
--build-arg USERNAME=$USERNAME redhat
podman build --tag systemd \
--build-arg BASEIMAGE=docker.io/oraclelinux:8.5 \
--build-arg USERNAME=$USERNAME redhat
podman build --tag systemd \
--build-arg BASEIMAGE=registry.access.redhat.com/ubi8/ubi:8.5 \
--build-arg USERNAME=$USERNAME redhat
podman build --tag systemd \
--build-arg BASEIMAGE=docker.io/opensuse/leap:15.3 \
--build-arg USERNAME=$USERNAME opensuse
podman run -d --rm -p 2022:22 --systemd=true --name systemd systemd
ssh -p 2022 localhost