summaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile
blob: 0405aa457f72c700f2aaab3f89f65ece6a20aacc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
##########################################
#####Docker container for QTIP############
##########################################

FROM ubuntu:16.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 \
    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 \
    git \
    gcc \
    build-essential\
    libssl-dev\
    libffi-dev\
    locales \
    supervisor \
    python-dev \
    python-pip \
    python-setuptools \
    rsync \
    iputils-ping \
    wget \
    curl \
    openssh-client \
    --no-install-recommends \
    && rm -rf /var/lib/apt/lists/*

RUN pip install -U pip && pip install -U setuptools

#Cloning Repos
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

# Exposing ports
EXPOSE 5000

#Config supervisor
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"]