ARG BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-init:9.8 FROM ${BASE_IMAGE} ENV container=docker ENV SDP_DISTRO_PYTHON=/usr/bin/python3.12 RUN dnf -y install \ systemd dbus sudo hostname bash coreutils-single findutils diffutils procps-ng psmisc lsof strace net-tools \ ca-certificates curl-minimal wget tar gzip unzip rsync openssh-clients openssh-server \ gcc gcc-c++ make openssl openssl-devel zlib-devel bzip2-devel \ sqlite-devel libffi-devel xz-devel openldap-devel cyrus-sasl-devel \ python3.12 python3.12-devel python3.12-pip iproute util-linux \ && dnf clean all \ && useradd --create-home --shell /bin/bash perforce \ && usermod --password "$(openssl passwd -6 "$(openssl rand -base64 48)")" perforce \ && chmod 0400 /etc/shadow \ && systemctl mask getty.target console-getty.service systemd-logind.service # Root-only read permission avoids host AppArmor denying unix_chkpwd's DAC # override on RHEL's mode-000 shadow file inside the disposable container. RUN systemctl mask systemd-binfmt.service STOPSIGNAL SIGRTMIN+3 CMD ["/sbin/init"]