FROM 192.168.4.36/baseimg/python
MAINTAINER kalvin "dekun.dai@quantgroup.cn"

ARG SYSTEM_NAME

USER root
WORKDIR /home/quant_group
RUN mkdir ${SYSTEM_NAME}

ARG BUILD_NUMBER
RUN echo "${BUILD_NUMBER}" >> ./version.txt

EXPOSE 80

RUN yum install mysql-libs mysql-devel -y
RUN pip install tornado MySQL-python DBUtils synthesis executor futures

COPY docker-entrypoint.sh .
COPY dist.tgz ./${SYSTEM_NAME}/dist.tgz

RUN chmod +x ./docker-entrypoint.sh

CMD ["./docker-entrypoint.sh"]