mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 1 | FROM ubuntu:18.04 |
| 2 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 3 | ## Be careful of Windows newlines |
Brian Freeman | f6032df | 2019-02-18 09:59:12 -0500 | [diff] [blame] | 4 | MAINTAINER "ONAP" |
Brian Freeman | f6032df | 2019-02-18 09:59:12 -0500 | [diff] [blame] | 5 | LABEL name="Docker image for the ONAP Robot Testing Framework" |
DR695H | c0cf6a4 | 2019-07-26 16:42:36 -0400 | [diff] [blame] | 6 | LABEL usage="docker run -e ROBOT_TEST=<testname> -ti onapete" |
Puzikov Dmitry | 38bcba6 | 2019-02-15 16:58:35 +0100 | [diff] [blame] | 7 | ENV BUILDTIME=true |
Jerry Flood | 633a15d | 2017-06-02 16:46:11 -0400 | [diff] [blame] | 8 | |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 9 | ARG TESTSUITE_TAG=master |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 10 | ARG PYTHON_UTILS_TAG=master |
| 11 | ARG DEMO_TAG=master |
Krzysztof Kuzmicki | 5e6967f | 2021-10-01 12:22:06 +0200 | [diff] [blame] | 12 | ARG KUBERNETES_VERSION="v1.19.11" |
| 13 | ARG HELM_VERSION="v3.3.4" |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 14 | |
| 15 | ARG TESTSUITE_REPO=git.onap.org/testsuite |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 16 | ARG PYTHON_UTILS_REPO=git.onap.org/testsuite/python-testing-utils.git |
| 17 | ARG DEMO_REPO=git.onap.org/demo |
| 18 | |
| 19 | COPY requirements.txt requirements.txt |
| 20 | |
Krzysztof Kuzmicki | 590d66f | 2020-10-07 09:23:18 +0200 | [diff] [blame] | 21 | # Install kubectl |
| 22 | # Note: Latest version may be found on: |
| 23 | # https://aur.archlinux.org/packages/kubectl-bin/ |
| 24 | ADD https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/amd64/kubectl /usr/local/bin/kubectl |
Krzysztof Kuzmicki | 5e6967f | 2021-10-01 12:22:06 +0200 | [diff] [blame] | 25 | ADD https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 get_helm.sh |
Krzysztof Kuzmicki | 590d66f | 2020-10-07 09:23:18 +0200 | [diff] [blame] | 26 | |
Puzikov Dmitry | 38bcba6 | 2019-02-15 16:58:35 +0100 | [diff] [blame] | 27 | # Install Python, Pip, Robot framework, chromium, lighttpd web server |
| 28 | RUN 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 \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 42 | python2.7 python-dev python-setuptools python-wheel python-pip \ |
stark, steven | ea4af0c | 2019-08-28 16:11:53 -0700 | [diff] [blame] | 43 | netbase \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 44 | unzip zip \ |
| 45 | x11-utils x11-xserver-utils \ |
Puzikov Dmitry | 38bcba6 | 2019-02-15 16:58:35 +0100 | [diff] [blame] | 46 | xvfb \ |
Brian Freeman | 01d503a | 2019-04-10 14:51:59 -0500 | [diff] [blame] | 47 | xxd \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 48 | wget vim \ |
| 49 | python3.7 python3.7-dev python3-pip && \ |
| 50 | mkdir -p /var/opt/ONAP && \ |
Pratik raj | 309e87c | 2020-12-30 18:54:43 +0530 | [diff] [blame] | 51 | pip install --no-cache-dir -r requirements.txt && \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 52 | pip install --no-cache-dir \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 53 | 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 Kuzmicki | 590d66f | 2020-10-07 09:23:18 +0200 | [diff] [blame] | 55 | git clone --depth 1 https://$DEMO_REPO -b $DEMO_TAG /var/opt/ONAP/demo && \ |
Krzysztof Kuzmicki | 5e6967f | 2021-10-01 12:22:06 +0200 | [diff] [blame] | 56 | chmod +x /usr/local/bin/kubectl && \ |
| 57 | chmod 700 get_helm.sh && \ |
Krzysztof Kuzmicki | 55d91bc | 2022-03-17 15:00:46 +0100 | [diff] [blame] | 58 | ./get_helm.sh --version $HELM_VERSION && \ |
| 59 | mkdir -p /app && \ |
| 60 | cp /var/opt/ONAP/setup-hvves.sh /app |
| 61 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 62 | |
Pratik raj | 309e87c | 2020-12-30 18:54:43 +0530 | [diff] [blame] | 63 | RUN python3.7 -m pip install --no-cache-dir setuptools wheel |
| 64 | RUN python3.7 -m pip install --no-cache-dir virtualenv |
stark, steven | ea4af0c | 2019-08-28 16:11:53 -0700 | [diff] [blame] | 65 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 66 | # Copy the robot code |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 67 | RUN 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 Dmitry | 38bcba6 | 2019-02-15 16:58:35 +0100 | [diff] [blame] | 72 | && 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 \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 76 | && chmod 600 /var/opt/ONAP/robot/assets/keys/* && \ |
| 77 | cd /var/opt/ONAP && ./setup.sh \ |
Puzikov Dmitry | 38bcba6 | 2019-02-15 16:58:35 +0100 | [diff] [blame] | 78 | && apt-get autoremove --assume-yes \ |
| 79 | && rm -rf /var/lib/apt/lists/* \ |
| 80 | && apt-get clean |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 81 | CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] |