[cvp-web]correct dockerfile 55/43555/1
authorgrakiss <grakiss.wanglei@huawei.com>
Fri, 29 Sep 2017 06:10:51 +0000 (02:10 -0400)
committergrakiss <grakiss.wanglei@huawei.com>
Fri, 29 Sep 2017 06:10:51 +0000 (02:10 -0400)
JIRA: DOVETAIL-515

correct dockerfile, git clone from dovetail

Change-Id: I1dee7f8ae5278f55bcf5928bbf88cdb079388494
Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
cvp/docker/Dockerfile
cvp/docker/Dockerfile.web

index 126afce..fa39ac6 100644 (file)
@@ -27,6 +27,9 @@ FROM ubuntu:14.04
 MAINTAINER SerenaFeng <feng.xiaowei@zte.com.cn>
 LABEL version="v1" description="OPNFV TestAPI Docker container"
 
+ARG BRANCH=master
+ARG COMMIT_ID=master
+
 ENV HOME /home
 
 # Packaged dependencies
@@ -40,10 +43,20 @@ python-pip \
 crudini \
 --no-install-recommends
 
+
+WORKDIR /home
+
 RUN pip install --upgrade pip
 
 RUN git config --global http.sslVerify false
-RUN git clone https://github.com/grakiss888/testapi.git /home/testapi
+
+RUN git clone https://gerrit.opnfv.org/gerrit/dovetail.git
+
+WORKDIR /home/dovetail
+RUN git checkout -f $COMMIT_ID
+
+RUN mkdir -p /home/testapi
+RUN cp -rf /home/dovetail/cvp/* /home/testapi
 
 WORKDIR /home/testapi/
 RUN pip install -r requirements.txt
index cee1551..b8a3dfc 100644 (file)
@@ -9,6 +9,8 @@ FROM ubuntu:16.04
 MAINTAINER Leo Wang <grakiss.wanglei@huawei.com>
 LABEL version="v1" description="CVP nginx"
 
+ARG BRANCH=master
+ARG COMMIT_ID=master
 
 ENV HOME /home
 WORKDIR /home
@@ -17,7 +19,15 @@ RUN apt-get update
 
 RUN apt-get install -y git nginx supervisor
 
-RUN git clone http://github.com/grakiss888/testapi
+RUN git config --global http.sslVerify false
+RUN git clone https://gerrit.opnfv.org/gerrit/dovetail.git
+
+WORKDIR /home/dovetail
+RUN git checkout -f $COMMIT_ID
+
+RUN mkdir -p /home/testapi
+
+RUN cp -rf /home/dovetail/cvp/* /home/testapi
 
 RUN mkdir /www
 RUN cp -r /home/testapi/3rd_party/static /www/