aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhihui wu <wu.zhihui1@zte.com.cn>2017-08-11 00:48:47 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-11 00:48:47 +0000
commit72f2521a18aeed7aa3485f98b15eaa325deafa18 (patch)
tree12de57a72ba6c40343e6d3331f3fbd30763302b1
parent7cce634eea37d7ea25d5c3ae757514333986a8bb (diff)
parentbad7263eca7dd3fead2ae222729b7452a50a236b (diff)
Merge "Optimize Dockerfile"
-rw-r--r--docker/Dockerfile37
1 files changed, 17 insertions, 20 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index bab503fc..8109fb69 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -8,11 +8,17 @@ LABEL version="0.1" description="OPNFV QTIP Docker container"
ARG BRANCH=master
-ENV REPOS_DIR /home/opnfv/repos
-ENV PYTHONPATH /home/opnfv/repos/qtip
-ENV USER root
+ENV REPOS_DIR=/home/opnfv/repos \
+ PYTHONPATH=/home/opnfv/repos/qtip \
+ USER=root
+
WORKDIR /home/opnfv
+RUN mkdir -p ${REPOS_DIR} \
+ && mkdir -p /root/qtip/logs \
+ && mkdir -p /root/.ssh \
+ && chmod 700 /root/.ssh
+
# Packaged Dependencies
RUN apt-get update && apt-get install -y \
software-properties-common \
@@ -28,26 +34,18 @@ RUN apt-get update && apt-get install -y \
python-setuptools \
rsync \
iputils-ping \
+ wget \
+ curl \
--no-install-recommends \
-&& rm -rf /var/lib/apt/lists/*
+ && rm -rf /var/lib/apt/lists/*
RUN pip install -U pip && pip install -U setuptools
-RUN apt-add-repository ppa:ansible/ansible -y
-RUN apt-key update -y
-RUN apt-get update && apt-get install ansible -y
-
-RUN mkdir -p ${REPOS_DIR}
-RUN mkdir -p /root/.ssh
-RUN mkdir -p /root/qtip/logs
-
-RUN chmod 700 /root/.ssh
-
#Cloning Repos
-RUN git config --global http.sslVerify false
-RUN git clone -b $BRANCH https://gerrit.opnfv.org/gerrit/qtip $REPOS_DIR/qtip
-
-RUN cd $REPOS_DIR/qtip && pip install -U -e .
+RUN git config --global http.sslVerify false \
+ && git clone -b $BRANCH https://gerrit.opnfv.org/gerrit/qtip $REPOS_DIR/qtip \
+ && cd $REPOS_DIR/qtip \
+ && pip install -U -e .
RUN echo 'eval $(ssh-agent)' >> /root/.bashrc
@@ -55,8 +53,7 @@ RUN echo 'eval $(ssh-agent)' >> /root/.bashrc
EXPOSE 5000
#Config supervisor
-RUN mkdir -p /var/log/supervisor
-RUN locale-gen en_US en_US.UTF-8
+RUN mkdir -p /var/log/supervisor && locale-gen en_US en_US.UTF-8
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord"] \ No newline at end of file