File: test_suite-debian12

package info (click to toggle)
scap-security-guide 0.1.76-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 110,644 kB
  • sloc: xml: 241,883; sh: 73,777; python: 32,527; makefile: 27
file content (27 lines) | stat: -rw-r--r-- 793 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# This Dockerfile is a minimal example for a Debian 12 test suite target container.
FROM debian:12

ENV AUTH_KEYS=/root/.ssh/authorized_keys
ENV DEBIAN_FRONTEND=noninteractive

ARG CLIENT_PUBLIC_KEY
ARG ADDITIONAL_PACKAGES

# install additional packages
RUN true \
        && apt update \
	&& apt install -y openssh-server python3 openscap-scanner \
	   python3-apt $ADDITIONAL_PACKAGES \
        && true

RUN true \
        && ssh-keygen -A \
	&& mkdir -p /root/.ssh \
        && printf "%s\n" "$CLIENT_PUBLIC_KEY" >> "$AUTH_KEYS" \
        && chmod og-rw /root/.ssh "$AUTH_KEYS" \
        && sed -i '/session\s\+required\s\+pam_loginuid.so/d' /etc/pam.d/sshd \
	&& echo CPE_NAME="cpe:/o:debian:debian_linux:12" >> /etc/os-release \
	&& true

RUN mkdir /run/sshd
CMD ["/usr/sbin/sshd", "-D"]