aboutsummaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile
diff options
context:
space:
mode:
authorwu.zhihui <wu.zhihui1@zte.com.cn>2016-12-05 10:40:48 +0800
committerwu.zhihui <wu.zhihui1@zte.com.cn>2016-12-05 10:40:48 +0800
commit2d3b291a0936de63a2d894133237934213f5968d (patch)
treea612bad3f4fdd86e277c8e91c186f33a92f58a43 /docker/Dockerfile
parent4a8eb45a1a3aefea5b6cdb9ef1535782b2ebe84b (diff)
[QTIP-157]fix docker build job
Bugfix task QTIP-157. Add agrument BRANCH in Dockerfile. JIRA: QTIP-157 Change-Id: I5558c23dde948e28f9c989bee7f4a42dc886f5a1 Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'docker/Dockerfile')
-rw-r--r--docker/Dockerfile13
1 files changed, 4 insertions, 9 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 5762409a..4f2cb877 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -7,8 +7,7 @@ FROM ubuntu:14.04
MAINTAINER Yujun Zhang <zhang.yujunz@zte.com.cn>
LABEL version="0.1" description="OPNFV QTIP Docker container"
-
-
+ARG BRANCH=master
ENV REPOS_DIR /home/opnfv/repos
ENV QTIP_DIR /home/opnfv/repos/qtip
@@ -16,10 +15,7 @@ ENV PYTHONPATH /home/opnfv/repos/qtip
ENV HOME /home/opnfv
WORKDIR /home/opnfv
-
-#Packaged Dependencies
-
-
+# Packaged Dependencies
RUN apt-get update && apt-get install -y \
software-properties-common \
wget \
@@ -38,13 +34,13 @@ curl \
supervisor \
--no-install-recommends
+
RUN apt-add-repository ppa:ansible/ansible -y
RUN apt-key update -y
RUN apt-get update -y
RUN apt-get install ansible --force-yes -y
-
RUN mkdir -p ${REPOS_DIR}
RUN mkdir -p /root/.ssh
RUN mkdir -p $HOME/qtip/logs
@@ -58,7 +54,7 @@ COPY ansible.cfg.default /root/.ansible.cfg
#Cloning Repos
RUN git config --global http.sslVerify false
-RUN git clone https://gerrit.opnfv.org/gerrit/qtip $REPOS_DIR/qtip
+RUN git clone -b $BRANCH https://gerrit.opnfv.org/gerrit/qtip $REPOS_DIR/qtip
RUN git clone https://gerrit.opnfv.org/gerrit/releng $REPOS_DIR/releng
RUN pip install -r $REPOS_DIR/qtip/requirements.txt
@@ -69,5 +65,4 @@ RUN mkdir -p /var/log/supervisor
RUN locale-gen en_US en_US.UTF-8
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
-
CMD ["/usr/bin/supervisord"]