46409cdbf644a95636951b2b89c6631eb7ed503b
[testsuite.git] / docker / Dockerfile
1 FROM ubuntu
2 ## Be careful of Windows newlines
3
4 MAINTAINER "ONAP"
5
6 LABEL name="Docker image for the ONAP Robot Testing Framework"
7 LABEL usage="docker run -e ROBOT_TEST=<testname> -ti openecompete"
8
9 ENV BUILDTIME=true
10
11 # Install Python, Pip, Robot framework, chromium, lighttpd web server
12 RUN apt-get update \
13     && apt-get install \
14         --no-install-recommends \
15         --assume-yes \
16             chromium-browser \
17             chromium-chromedriver \
18             dnsutils \
19             git \
20             gcc \
21             libffi-dev \
22             libssl-dev \
23             lighttpd \
24             make \
25             net-tools \
26             python2.7 \
27             python-dev \
28             python-setuptools \
29             python-wheel \
30             python-pip \
31             unzip \
32             x11-utils \
33             x11-xserver-utils \
34             xvfb \
35             xxd  \
36             vim
37             
38
39 RUN pip install robotframework==3.0.4 \
40     && python --version
41
42 # Copy the robot code
43 COPY . /var/opt/ONAP/
44 COPY lighttpd.conf /etc/lighttpd/lighttpd.conf
45 COPY authorization /etc/lighttpd/authorization
46 RUN chmod 777 /var/opt/ONAP/setup.sh \
47     && chmod 777 /var/opt/ONAP/runTags.sh \
48     && chmod 777 /var/opt/ONAP/dnstraffic.sh \
49     && chmod 777 /var/opt/ONAP/runSoak.sh \
50     && chmod 777 /var/opt/ONAP/runEteTag.sh \
51     && chmod 600 /var/opt/ONAP/robot/assets/keys/* 
52
53 RUN cd /var/opt/ONAP \
54     && ./setup.sh \
55     && apt-get autoremove --assume-yes \
56     && rm -rf /var/lib/apt/lists/*  \
57     && apt-get clean
58
59 CMD ["lighttpd", "-D", "-f",  "/etc/lighttpd/lighttpd.conf"]
60
61
62