FROM ubuntu:17.10

RUN apt-get update && apt-get install -y openssh-server

RUN mkdir -p /var/run/sshd && sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config && sed -i "s/PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config

RUN apt-get install python3.6

RUN apt-get install -y python3-pip

RUN apt-get install -y iputils-ping

RUN apt-get install -y telnet

RUN python3.6 -m pip install parallel_ga_processing

ADD run.py /run.py

ADD set_root_pw.sh /set_root_pw.sh

ADD run.sh /run.sh

RUN chmod +x /*.sh

ENV AUTHORIZED_KEYS **None**

RUN echo "31.250.0.2     student2" >> /etc/hosts

RUN ssh-keygen -t rsa -N "blablabla" -f /root/.ssh/id_rsa
EXPOSE 22

CMD ["/run.sh"]
