# Debian-family test node WITH systemd as PID 1 (chlift's systemd path): Ubuntu 24.04, sshd key auth only.
FROM ubuntu:24.04
RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq systemd systemd-sysv openssh-server sudo procps ca-certificates >/dev/null \
 && apt-get clean && sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/; s/^#\?PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config \
 && mkdir -p /root/.ssh && chmod 700 /root/.ssh && systemctl enable ssh >/dev/null 2>&1
COPY authorized_keys /root/.ssh/authorized_keys
STOPSIGNAL SIGRTMIN+3
CMD ["/sbin/init"]
