summaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile
blob: 188a8e15117cd03d9b13b1e1b391978e6402a8ce (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM ubuntu
## Be careful of Windows newlines

MAINTAINER "ONAP"

LABEL name="Docker image for the ONAP Robot Testing Framework"
LABEL usage="docker run -e ROBOT_TEST=<testname> -ti onapete"

ENV BUILDTIME=true

# Install Python, Pip, Robot framework, chromium, lighttpd web server
RUN apt-get update \
    && apt-get install \
        --no-install-recommends \
        --assume-yes \
            chromium-browser \
            chromium-chromedriver \
            dnsutils \
            git \
            gcc \
            libffi-dev \
            libssl-dev \
            lighttpd \
            make \
            net-tools \
            python2.7 \
            python-dev \
            python-setuptools \
            python-wheel \
            python-pip \
            netbase \
            unzip \
            x11-utils \
            x11-xserver-utils \
            xvfb \
            xxd  \
            vim

# install python 3 after so it isn't default python version
RUN apt-get install \
        --no-install-recommends \
        --assume-yes \
            python3.7 \
            python3.7-dev \
            python3-pip

RUN pip install robotframework==3.1.2 \
    && python --version

RUN python3.7 -m pip install setuptools wheel
RUN python3.7 -m pip install virtualenv

# Copy the robot code
COPY html/ /var/opt/ONAP/html
COPY robot/ /var/opt/ONAP/robot
COPY *.sh /var/opt/ONAP/
COPY docker/lighttpd.conf /etc/lighttpd/lighttpd.conf
COPY docker/authorization /etc/lighttpd/authorization
RUN chmod 777 /var/opt/ONAP/setup.sh \
    && chmod 777 /var/opt/ONAP/runTags.sh \
    && chmod 777 /var/opt/ONAP/dnstraffic.sh \
    && chmod 777 /var/opt/ONAP/runSoak.sh \
    && chmod 777 /var/opt/ONAP/runEteTag.sh \
    && chmod 600 /var/opt/ONAP/robot/assets/keys/* 

RUN cd /var/opt/ONAP \
    && ./setup.sh \
    && apt-get autoremove --assume-yes \
    && rm -rf /var/lib/apt/lists/*  \
    && apt-get clean

CMD ["lighttpd", "-D", "-f",  "/etc/lighttpd/lighttpd.conf"]