blob: c8e97dc09f22b8f4662b5a69e9be7db28a5b6c16 [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
mrichomme83a352f2020-04-06 18:04:22 +020010ARG PYTHON_UTILS_TAG=master
11ARG DEMO_TAG=master
Krzysztof Kuzmicki5e6967f2021-10-01 12:22:06 +020012ARG KUBERNETES_VERSION="v1.19.11"
13ARG HELM_VERSION="v3.3.4"
mrichomme83a352f2020-04-06 18:04:22 +020014
15ARG TESTSUITE_REPO=git.onap.org/testsuite
mrichomme83a352f2020-04-06 18:04:22 +020016ARG PYTHON_UTILS_REPO=git.onap.org/testsuite/python-testing-utils.git
17ARG DEMO_REPO=git.onap.org/demo
18
19COPY requirements.txt requirements.txt
20
Krzysztof Kuzmicki590d66f2020-10-07 09:23:18 +020021# Install kubectl
22# Note: Latest version may be found on:
23# https://aur.archlinux.org/packages/kubectl-bin/
24ADD https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/amd64/kubectl /usr/local/bin/kubectl
Krzysztof Kuzmicki5e6967f2021-10-01 12:22:06 +020025ADD https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 get_helm.sh
Krzysztof Kuzmicki590d66f2020-10-07 09:23:18 +020026
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010027# Install Python, Pip, Robot framework, chromium, lighttpd web server
28RUN apt-get update \
29 && apt-get install \
30 --no-install-recommends \
31 --assume-yes \
32 chromium-browser \
33 chromium-chromedriver \
34 dnsutils \
35 git \
36 gcc \
37 libffi-dev \
38 libssl-dev \
39 lighttpd \
40 make \
41 net-tools \
mrichomme83a352f2020-04-06 18:04:22 +020042 python2.7 python-dev python-setuptools python-wheel python-pip \
stark, stevenea4af0c2019-08-28 16:11:53 -070043 netbase \
mrichomme83a352f2020-04-06 18:04:22 +020044 unzip zip \
45 x11-utils x11-xserver-utils \
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010046 xvfb \
Brian Freeman01d503a2019-04-10 14:51:59 -050047 xxd \
mrichomme83a352f2020-04-06 18:04:22 +020048 wget vim \
49 python3.7 python3.7-dev python3-pip && \
50 mkdir -p /var/opt/ONAP && \
Pratik raj309e87c2020-12-30 18:54:43 +053051 pip install --no-cache-dir -r requirements.txt && \
mrichomme83a352f2020-04-06 18:04:22 +020052 pip install --no-cache-dir \
mrichomme83a352f2020-04-06 18:04:22 +020053 git+https://$PYTHON_UTILS_REPO@$PYTHON_UTILS_TAG#egg=robotframework-onap\&subdirectory=robotframework-onap && \
54 git clone --depth 1 https://$TESTSUITE_REPO -b $TESTSUITE_TAG /var/opt/ONAP && \
Krzysztof Kuzmicki590d66f2020-10-07 09:23:18 +020055 git clone --depth 1 https://$DEMO_REPO -b $DEMO_TAG /var/opt/ONAP/demo && \
Krzysztof Kuzmicki5e6967f2021-10-01 12:22:06 +020056 chmod +x /usr/local/bin/kubectl && \
57 chmod 700 get_helm.sh && \
Krzysztof Kuzmicki55d91bc2022-03-17 15:00:46 +010058 ./get_helm.sh --version $HELM_VERSION && \
59 mkdir -p /app && \
60 cp /var/opt/ONAP/setup-hvves.sh /app
61
DR695Hccff30b2017-02-17 18:44:24 -050062
Pratik raj309e87c2020-12-30 18:54:43 +053063RUN python3.7 -m pip install --no-cache-dir setuptools wheel
64RUN python3.7 -m pip install --no-cache-dir virtualenv
stark, stevenea4af0c2019-08-28 16:11:53 -070065
DR695Hccff30b2017-02-17 18:44:24 -050066# Copy the robot code
mrichomme83a352f2020-04-06 18:04:22 +020067RUN mkdir -p /etc/lighttpd && \
68 rm /etc/lighttpd/lighttpd.conf && \
69 ln -s /var/opt/ONAP/docker/lighttpd.conf /etc/lighttpd/lighttpd.conf && \
70 ln -s /var/opt/ONAP/docker/authorization /etc/lighttpd/authorization && \
71 chmod 777 /var/opt/ONAP/setup.sh \
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010072 && chmod 777 /var/opt/ONAP/runTags.sh \
73 && chmod 777 /var/opt/ONAP/dnstraffic.sh \
74 && chmod 777 /var/opt/ONAP/runSoak.sh \
75 && chmod 777 /var/opt/ONAP/runEteTag.sh \
mrichomme83a352f2020-04-06 18:04:22 +020076 && chmod 600 /var/opt/ONAP/robot/assets/keys/* && \
77 cd /var/opt/ONAP && ./setup.sh \
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010078 && apt-get autoremove --assume-yes \
79 && rm -rf /var/lib/apt/lists/* \
80 && apt-get clean
DR695Hccff30b2017-02-17 18:44:24 -050081CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]