Files
ansible_role_package/tests/Containerfile
Matthew Stobbs 069c4aa49e adding tests
- stat doesn't work on remote, need to figure out a workaround
2025-02-14 22:52:53 -07:00

18 lines
473 B
Docker

FROM fedora:41
LABEL PROJECT "ansible_role_package"
LABEL MAINTAINER "Matthew Stobbs <matthew@stobbs.ca>"
RUN useradd -d /home/ansible -m -G wheel ansible
RUN dnf install -y openssh-server python3-paramiko python3-libdnf5
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