e44a47f7e7fb85ba8a1355d9cad8e19ae8739c9d
[it/test.git] / ric_robot_suite / docker / ric-robot / Dockerfile
1 #
2 #
3 # Copyright 2019 AT&T Intellectual Property
4 # Copyright 2019 Nokia
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18
19 FROM ubuntu
20 ## Be careful of Windows newlines
21
22 MAINTAINER "RIC"
23
24 LABEL name="Docker image for the RIC Robot Testing Framework"
25 LABEL usage="docker run -e ROBOT_TEST=<testname> -ti ric-robot"
26
27
28 ENV TZ=America/New_York
29 RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
30
31 ENV BUILDTIME=true
32
33 # Install Python, Pip, Robot framework, chromium, lighttpd web server
34 RUN apt-get update \
35     && apt-get install \
36         --no-install-recommends \
37         --assume-yes \
38             chromium-browser \
39             chromium-chromedriver \
40             dnsutils \
41             git \
42             gcc \
43             libffi-dev \
44             libssl-dev \
45             lighttpd \
46             make \
47             net-tools \
48             php  \
49             php-cgi \
50             python2.7 \
51             python-dev \
52             python-setuptools \
53             python-wheel \
54             python-pip \
55             python-redis \
56             unzip \
57             vim   \
58             x11-utils \
59             x11-xserver-utils \
60             xvfb \
61             xxd
62
63
64 RUN pip install robotframework==3.0.4 \
65     && python --version
66
67 # Copy the robot code
68
69 COPY robot /var/opt/RIC/robot
70 COPY red.xml /var/opt/RIC
71 COPY ric-python-utils /var/opt/RIC/ric-python-utils
72 COPY runTags.sh /var/opt/RIC
73 COPY setup.sh /var/opt/RIC
74 COPY version.properties /var/opt/RIC
75 COPY README.md /var/opt/RIC
76 COPY docker/ric-robot/lighttpd.conf /etc/lighttpd/lighttpd.conf
77 COPY docker/ric-robot/authorization /etc/lighttpd/authorization
78
79 RUN chmod 777 /var/opt/RIC/setup.sh \
80     && chmod 777 /var/opt/RIC/runTags.sh \
81     && chmod 600 /var/opt/RIC/robot/assets/keys/*
82
83 RUN cd /var/opt/RIC \
84     && ./setup.sh \
85     && apt-get autoremove --assume-yes \
86     && rm -rf /var/lib/apt/lists/*  \
87     && apt-get clean
88
89 RUN mkdir /root/.kube
90
91 CMD ["lighttpd", "-D", "-f",  "/etc/lighttpd/lighttpd.conf"]
92
93
94