aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorzhihui wu <wu.zhihui1@zte.com.cn>2017-05-09 09:24:50 +0800
committerzhihui wu <wu.zhihui1@zte.com.cn>2017-05-10 10:21:47 +0800
commitce0288146629dbb7a37871fd31452adf88a5ac09 (patch)
treec3bea8bf3d691285043619aaeece50f503acb41f /docker
parent28769eb7866a0fd362dd68e9ea545a82f136c679 (diff)
update Dockerfile
- remove dependencies which is not in use - remove unuse envrioment variables HOME and QTIP_DIR - set envrioment variable USER to root - pip install qtip with parameter -e - automatically startup ssh-agent Change-Id: I16999db53745b03c00260b2b5d73c5e89c0005f3 Signed-off-by: zhihui wu <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile29
1 files changed, 8 insertions, 21 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index dd2bda35..16e552f1 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -9,33 +9,23 @@ 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
ENV PYTHONPATH /home/opnfv/repos/qtip
-ENV HOME /home/opnfv
+ENV USER root
WORKDIR /home/opnfv
# Packaged Dependencies
RUN apt-get update && apt-get install -y \
software-properties-common \
- wget \
git \
gcc \
- ssh \
- expect \
build-essential\
libssl-dev\
libffi-dev\
- python-matplotlib \
+ locales \
+ supervisor \
python-dev \
python-pip \
- libjpeg62 \
- libjpeg62-dev \
- zlib1g-dev \
- python-tk \
- curl \
- supervisor \
python-setuptools \
- iputils-ping\
rsync \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
@@ -49,20 +39,17 @@ RUN apt-get update && apt-get install ansible -y
RUN mkdir -p ${REPOS_DIR}
RUN mkdir -p /root/.ssh
-RUN mkdir -p $HOME/qtip/logs
-RUN mkdir -p $HOME/qtip/results
+RUN mkdir -p /root/qtip/logs
RUN chmod 700 /root/.ssh
-#Config ansible
-COPY ansible.cfg.default $HOME/.ansible.cfg
-
#Cloning Repos
RUN git config --global http.sslVerify false
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 cd $REPOS_DIR/qtip && pip install -U .
+RUN cd $REPOS_DIR/qtip && pip install -U -e .
+
+RUN echo 'eval $(ssh-agent)' >> /root/.bashrc
# Exposing ports
EXPOSE 5000
@@ -72,4 +59,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"]
+CMD ["/usr/bin/supervisord"] \ No newline at end of file