diff options
Diffstat (limited to 'docker/Dockerfile')
-rw-r--r-- | docker/Dockerfile | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 8cc15e0b..eb85ea49 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,6 +2,8 @@ FROM ubuntu:14.04 MAINTAINER Leo Wang <grakiss.wanglei@huawei.com> LABEL version="0.1" description="OPNFV Dovetail Docker Container" +ARG BRANCH=master + RUN \ apt-get update \ && \ @@ -13,27 +15,35 @@ RUN \ python-mock \ python-pip \ apt-transport-https \ + wget \ --no-install-recommends \ && \ - apt-get update && apt-get -y install docker.io + apt-get update + +RUN wget -qO- https://get.docker.com/ \ +| \ + sed 's/-q docker-ce/-q docker-ce=17.03.0~ce-0~ubuntu-trusty/' \ +| \ + sed 's/edge/stable/' \ +| \ + sh ENV HOME /home/opnfv ENV REPOS_DIR ${HOME}/dovetail WORKDIR /home/opnfv RUN \ - git config --global http.sslVerify false \ -&& \ - git clone https://git.opnfv.org/dovetail ${REPOS_DIR} \ + mkdir -p ${REPOS_DIR} \ && \ - mkdir -p ${REPOS_DIR}/results \ -&& \ - pip install -U pip \ -&& \ - pip install -r ${REPOS_DIR}/requirements.txt \ + git config --global http.sslVerify false \ && \ - cd ${REPOS_DIR} \ + pip install git+https://git.opnfv.org/dovetail@$BRANCH#egg=dovetail \ && \ - pip install -e . + ln -s /usr/local/lib/python2.7/dist-packages/dovetail ${REPOS_DIR}/dovetail WORKDIR ${REPOS_DIR}/dovetail + +# get db schema from opnfv sites +RUN mkdir -p ${REPOS_DIR}/dovetail/utils/local_db +ADD get_db_schema.py ${REPOS_DIR}/dovetail/utils/local_db +RUN cd ${REPOS_DIR}/dovetail/utils/local_db && python get_db_schema.py |