blob: 8fcecfedd0dec56371e7bfa8c4244349cb429da8 [file] [log] [blame]
mrichomme83a352f2020-04-06 18:04:22 +02001FROM ubuntu:18.04
2
DR695Hccff30b2017-02-17 18:44:24 -05003## Be careful of Windows newlines
Brian Freemanf6032df2019-02-18 09:59:12 -05004MAINTAINER "ONAP"
Brian Freemanf6032df2019-02-18 09:59:12 -05005LABEL name="Docker image for the ONAP Robot Testing Framework"
DR695Hc0cf6a42019-07-26 16:42:36 -04006LABEL usage="docker run -e ROBOT_TEST=<testname> -ti onapete"
Puzikov Dmitry38bcba62019-02-15 16:58:35 +01007ENV BUILDTIME=true
Jerry Flood633a15d2017-06-02 16:46:11 -04008
mrichomme83a352f2020-04-06 18:04:22 +02009ARG TESTSUITE_TAG=master
10ARG HEATBRIDGE_TAG=master
11ARG PYTHON_UTILS_TAG=master
12ARG DEMO_TAG=master
Krzysztof Kuzmicki590d66f2020-10-07 09:23:18 +020013ARG KUBERNETES_VERSION="v1.15.11"
14
mrichomme83a352f2020-04-06 18:04:22 +020015
16ARG TESTSUITE_REPO=git.onap.org/testsuite
Brian Freemand2aa3522020-11-24 09:41:38 -050017#ARG HEATBRIDGE_REPO=git.onap.org/testsuite/heatbridge.git
mrichomme83a352f2020-04-06 18:04:22 +020018ARG PYTHON_UTILS_REPO=git.onap.org/testsuite/python-testing-utils.git
19ARG DEMO_REPO=git.onap.org/demo
20
21COPY requirements.txt requirements.txt
22
Krzysztof Kuzmicki590d66f2020-10-07 09:23:18 +020023# Install kubectl
24# Note: Latest version may be found on:
25# https://aur.archlinux.org/packages/kubectl-bin/
26ADD https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/amd64/kubectl /usr/local/bin/kubectl
27
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010028# Install Python, Pip, Robot framework, chromium, lighttpd web server
29RUN apt-get update \
30 && apt-get install \
31 --no-install-recommends \
32 --assume-yes \
33 chromium-browser \
34 chromium-chromedriver \
35 dnsutils \
36 git \
37 gcc \
38 libffi-dev \
39 libssl-dev \
40 lighttpd \
41 make \
42 net-tools \
mrichomme83a352f2020-04-06 18:04:22 +020043 python2.7 python-dev python-setuptools python-wheel python-pip \
stark, stevenea4af0c2019-08-28 16:11:53 -070044 netbase \
mrichomme83a352f2020-04-06 18:04:22 +020045 unzip zip \
46 x11-utils x11-xserver-utils \
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010047 xvfb \
Brian Freeman01d503a2019-04-10 14:51:59 -050048 xxd \
mrichomme83a352f2020-04-06 18:04:22 +020049 wget vim \
50 python3.7 python3.7-dev python3-pip && \
51 mkdir -p /var/opt/ONAP && \
Pratik raj309e87c2020-12-30 18:54:43 +053052 pip install --no-cache-dir -r requirements.txt && \
mrichomme83a352f2020-04-06 18:04:22 +020053 pip install --no-cache-dir \
mrichomme83a352f2020-04-06 18:04:22 +020054 git+https://$PYTHON_UTILS_REPO@$PYTHON_UTILS_TAG#egg=robotframework-onap\&subdirectory=robotframework-onap && \
55 git clone --depth 1 https://$TESTSUITE_REPO -b $TESTSUITE_TAG /var/opt/ONAP && \
Krzysztof Kuzmicki590d66f2020-10-07 09:23:18 +020056 git clone --depth 1 https://$DEMO_REPO -b $DEMO_TAG /var/opt/ONAP/demo && \
mrichomme82223ef2020-10-14 17:51:08 +020057 chmod +x /usr/local/bin/kubectl
Brian Freemand2aa3522020-11-24 09:41:38 -050058 # moved in case line extension with comment isnt supported
59 #git+https://$HEATBRIDGE_REPO@$HEATBRIDGE_TAG#egg=heatbridge\&subdirectory=heatbridge \
DR695Hccff30b2017-02-17 18:44:24 -050060
Pratik raj309e87c2020-12-30 18:54:43 +053061RUN python3.7 -m pip install --no-cache-dir setuptools wheel
62RUN python3.7 -m pip install --no-cache-dir virtualenv
stark, stevenea4af0c2019-08-28 16:11:53 -070063
DR695Hccff30b2017-02-17 18:44:24 -050064# Copy the robot code
mrichomme83a352f2020-04-06 18:04:22 +020065RUN mkdir -p /etc/lighttpd && \
66 rm /etc/lighttpd/lighttpd.conf && \
67 ln -s /var/opt/ONAP/docker/lighttpd.conf /etc/lighttpd/lighttpd.conf && \
68 ln -s /var/opt/ONAP/docker/authorization /etc/lighttpd/authorization && \
69 chmod 777 /var/opt/ONAP/setup.sh \
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010070 && chmod 777 /var/opt/ONAP/runTags.sh \
71 && chmod 777 /var/opt/ONAP/dnstraffic.sh \
72 && chmod 777 /var/opt/ONAP/runSoak.sh \
73 && chmod 777 /var/opt/ONAP/runEteTag.sh \
mrichomme83a352f2020-04-06 18:04:22 +020074 && chmod 600 /var/opt/ONAP/robot/assets/keys/* && \
75 cd /var/opt/ONAP && ./setup.sh \
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010076 && apt-get autoremove --assume-yes \
77 && rm -rf /var/lib/apt/lists/* \
78 && apt-get clean
DR695Hccff30b2017-02-17 18:44:24 -050079CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]