Containerfile (1346B)
1 FROM docker.io/library/debian:trixie 2 3 ENV DEBIAN_FRONTEND=noninteractive 4 5 RUN apt-get update -yqq && \ 6 apt-get install -yqq \ 7 ansible \ 8 cron \ 9 git \ 10 locales \ 11 openssh-server \ 12 python3 \ 13 python3-debian \ 14 systemd \ 15 whois # mkpasswd provided by whois package 16 17 RUN mkdir -p /etc/ansible/facts.d 18 19 # Public ACME validation cannot reach this disposable local container. Keep 20 # the production certificate role in the test path while issuing local, 21 # short-lived certificates instead. 22 COPY --chmod=0755 contrib/test-certbot /usr/local/bin/certbot 23 24 ##################################################################### 25 ## WARNING: THIS ALLOWS FOR COMPLETELY UNAUTHENTICATED SSH SESSIONS # 26 ####### FOR TESTING ENVIRONMENT ONLY! ############################### 27 RUN echo "root:$(mkpasswd -s </dev/null)" | chpasswd -e 28 RUN sed -i'' -e's/^#PermitRootLogin prohibit-password$/PermitRootLogin yes/' /etc/ssh/sshd_config \ 29 && sed -i'' -e's/^#PasswordAuthentication yes$/PasswordAuthentication yes/' /etc/ssh/sshd_config \ 30 && sed -i'' -e's/^#PermitEmptyPasswords no$/PermitEmptyPasswords yes/' /etc/ssh/sshd_config \ 31 && sed -i'' -e's/^UsePAM yes/UsePAM no/' /etc/ssh/sshd_config