1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
# FROM DOCKER_PACKAGES
# MAINTAINER "Antony Antony" <antony@phenome.org>
# ENV container docker
# setup ssh
RUN mkdir /root/.ssh
RUN mkdir -p /var/run/sshd
# create ssh host keys
RUN ssh-keygen -P '' -b 2048 -t rsa -f /etc/ssh/ssh_host_key
# move public key to enable ssh keys login
# copy the file /root/.ssh/authorized_keys to cwd
ADD testing/baseconfigs/all/root/.ssh/authorized_keys /root/.ssh/authorized_keys
RUN chmod 400 /root/.ssh/authorized_keys
RUN chown -R root:root /root/.ssh
# RUN systemctl disable sshd
RUN sed -i 's/UsePAM\syes/UsePAM no/' /etc/ssh/sshd_config
RUN sed -i '/UseDNS/d' /etc/ssh/sshd_config
RUN echo "UseDNS no" >> /etc/ssh/sshd_config
RUN sed -i '/StrictModes/d' /etc/ssh/sshd_config
RUN echo "StrictModes no" >> /etc/ssh/sshd_config
ADD testing/docker/bash_profile /root/.bash_profile_docker
RUN cat /root/.bash_profile_docker >> /root/.bashrc; rm /root/.bash_profile_docker
RUN ln -s /home/build/libreswan/testing /testing
|