summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-11-30 15:49:47 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2016-11-30 15:51:21 +0100
commitb20e463faa9990a2bdfe13683f7fb76d32e2fd65 (patch)
tree36c7c3ab6c892afa3174ae422965263b35d01f5a
parent776ff48bc805fbca34811b54ebd7a3626a20f817 (diff)
Add BRANCH Argument in the Dockerfile
This patch allows: - clone the respective repo branch while building the image - slightly reduce the size of the image by cloning only the latest Change-Id: I48994d7d9cf230493fa22f39cf1ed7ef4fd72d9e Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
-rw-r--r--docker/Dockerfile6
1 files changed, 4 insertions, 2 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index fb25bfc..449ad70 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -23,6 +23,8 @@ FROM ubuntu:14.04
MAINTAINER Jose Lausuch <jose.lausuch@ericsson.com>
LABEL version="0.1" description="OPNFV Storperf Docker container"
+ARG BRANCH=master
+
ENV repos_dir /home/opnfv/repos
WORKDIR /home/opnfv
@@ -62,8 +64,8 @@ RUN mkdir -p /root/.ssh
RUN chmod 700 /root/.ssh
RUN git config --global http.sslVerify false
-RUN git clone https://gerrit.opnfv.org/gerrit/storperf ${repos_dir}/storperf
-RUN git clone https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng
+RUN git --depth 1 -b $BRANCH clone https://gerrit.opnfv.org/gerrit/storperf ${repos_dir}/storperf
+RUN git --depth 1 clone https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng
# Third party git fetches
RUN git clone https://github.com/swagger-api/swagger-ui.git ${repos_dir}/swagger-ui