FROM amazon/aws-eb-python:3.4.2-onbuild-3.5.1
RUN apt update -y
RUN apt install openjdk-7-jdk -y

WORKDIR /var/app

RUN mkdir -p /root/.ssh
ADD id_rsa /root/.ssh/id_rsa
RUN chmod 700 /root/.ssh/id_rsa
RUN ssh-keyscan -H github.com >> /root/.ssh/known_hosts \
    && chmod 600 /root/.ssh/known_hosts
RUN echo 'Host github.com\n\tStrictHostKeyChecking no\n' >> ~/.ssh/config
RUN pip install -U pip
RUN pip install -r requirements.txt
RUN apt-get install supervisor -y
ENTRYPOINT ["/usr/bin/supervisord", "-c", "conf/supervisor.conf"]
EXPOSE 9001
