bugfix: Add BRANCH Argument in the Dockerfile 89/25289/2
authorMatthewLi <matthew.lijun@huawei.com>
Thu, 1 Dec 2016 01:53:22 +0000 (20:53 -0500)
committerMatthewLi <matthew.lijun@huawei.com>
Thu, 1 Dec 2016 03:30:19 +0000 (22:30 -0500)
JIRA: DOVETAIL-147

1) BRANCH argument added to fix bug in CI
2) docker to use latest version, since BRANCH added not works with old version

Change-Id: Icb0144896389b0cb7ac80e1fb0338825be50d5b1
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
docker/Dockerfile

index cc21203..19dc361 100644 (file)
@@ -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 \
 && \
@@ -17,7 +19,7 @@ RUN \
 && \
     echo deb https://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list \
 && \
-    apt-get update &&  apt-get install -y docker-engine=1.9.1-0~trusty \
+    apt-get update &&  apt-get install -y docker-engine=1.12.3-0~trusty \
 && \
     pip install pyyaml \
         click \
@@ -30,7 +32,7 @@ WORKDIR /home/opnfv
 RUN \
     git config --global http.sslVerify false \
 && \
-    git clone https://gerrit.opnfv.org/gerrit/dovetail.git ${REPOS_DIR} \
+    git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/dovetail.git ${REPOS_DIR} \
 && \
     mkdir -p ${REPOS_DIR}/results