1
0
Fork 0
mirror of https://github.com/dawidd6/action-ansible-playbook.git synced 2024-11-22 15:32:18 +00:00
action-ansible-playbook/Dockerfile.test
2020-03-23 23:15:41 +01:00

17 lines
558 B
Text

FROM alpine
RUN apk -U add openssh-server openssh-sftp-server sudo python3
RUN adduser -D user
RUN passwd -u user
RUN echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
RUN echo "PasswordAuthentication no" > /etc/ssh/sshd_config
RUN echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config
RUN echo "AuthorizedKeysFile /etc/ssh/authorized_keys" >> /etc/ssh/sshd_config
RUN echo "PermitRootLogin no" >> /etc/ssh/sshd_config
RUN echo "Subsystem sftp /usr/lib/ssh/sftp-server" >> /etc/ssh/sshd_config
RUN ssh-keygen -A
COPY test.sh /
ENTRYPOINT ["/test.sh"]