ARG PLATFORM=rockylinux:8 FROM ${PLATFORM} RUN dnf install -y systemd systemd-libs procps wget rsyslog findutils dbus RUN dnf --nobest install -y cracklib-dicts diffutils elfutils epel-release expect findutils iproute gawk gcc-c++ gdb hostname lz4 patch perl procps-ng rsyslog sudo tar wget which # Remove fake systemd units that break container boot RUN find /lib/systemd/system \ /etc/systemd/system \ -path '*.wants/*' \ -name '*.service' \ -type l -exec rm -f {} \; # Mask things that fight in a container RUN systemctl mask \ systemd-remount-fs.service \ dev-hugepages.mount \ sys-fs-fuse-connections.mount \ systemd-logind.service \ getty.target console-getty.service # Tell systemd we’re in a container RUN echo 'DefaultEnvironment=container=docker' >> /etc/systemd/system.conf # Entrypoint = systemd STOPSIGNAL SIGRTMIN+3 CMD ["/lib/systemd/systemd"]