add more testing containers

This commit is contained in:
Matthew Stobbs
2025-02-23 03:11:12 -07:00
parent 57b3b93a18
commit 6397899d88
10 changed files with 82 additions and 29 deletions

View File

@@ -0,0 +1,18 @@
FROM ubuntu:24.04
LABEL PROJECT "ansible_role_package"
LABEL MAINTAINER "Matthew Stobbs <matthew@stobbs.ca>"
RUN useradd -d /home/ansible -m -G wheel ansible
RUN apt update && \
apt install -y openssh-server python3-paramiko gnupg2
EXPOSE 22
USER ansible
WORKDIR /home/ansible
RUN mkdir /home/ansible/.ssh
COPY ./pubkey /home/ansible/.ssh/authorized_keys
USER root
RUN echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/sudoers
RUN ssh-keygen -A
ENTRYPOINT /usr/sbin/sshd -D