# FROM  DOCKER_PACKAGES
# MAINTAINER "Antony Antony" <antony@phenome.org>
# ENV container docker
RUN mkdir -p /home/build/libreswan
VOLUME ["/home/build/libreswan:/home/build/libreswan"]
RUN ln -s /home/build/libreswan/testing /testing
#setup ssh
RUN mkdir /root/.ssh
RUN mkdir /var/run/sshd
# create ssh host keys
RUN ssh-keygen -b 1024 -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 enable 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
