FROM debian:9
MAINTAINER Jean Gabes <naparuba@gmail.com>

RUN        apt-get update && apt-get install -y python
# Setup test env, "standard" installation is test with other tests ^^
RUN        apt-get install -y python-pip
RUN        pip install jinja2
RUN        pip install leveldb
RUN        pip install pyOpenSSL
RUN        pip install pycrypto
RUN        pip install requests
RUN        pip install Crypto
RUN        pip install pygments
RUN        pip install coveralls
RUN        pip install nose-cov
RUN        pip install unittest2
RUN        apt-get install -y python-cherrypy3
RUN        pip install rsa
# The internal yaml seems to not be used, thanks nose
RUN        pip install ruamel.yaml==0.11.15
RUN        apt-get install -y jq
RUN        apt-get install -y curl


ADD        . /root/opsbro-oss
WORKDIR       /root/opsbro-oss

RUN       python setup.py install

ENTRYPOINT      cd test;bash test_apis.sh