Michal Jagiello | 8b8a4cf | 2022-12-22 08:45:18 +0000 | [diff] [blame] | 1 | FROM ubuntu:20.04 |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 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 |
Michal Jagiello | 8b8a4cf | 2022-12-22 08:45:18 +0000 | [diff] [blame] | 18 | ARG DEBIAN_FRONTEND=noninteractive |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 19 | |
| 20 | COPY requirements.txt requirements.txt |
| 21 | |
Krzysztof Kuzmicki | 590d66f | 2020-10-07 09:23:18 +0200 | [diff] [blame] | 22 | # Install kubectl |
| 23 | # Note: Latest version may be found on: |
| 24 | # https://aur.archlinux.org/packages/kubectl-bin/ |
| 25 | 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] | 26 | 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] | 27 | |
Puzikov Dmitry | 38bcba6 | 2019-02-15 16:58:35 +0100 | [diff] [blame] | 28 | # Install Python, Pip, Robot framework, chromium, lighttpd web server |
| 29 | RUN 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 \ |
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 \ |
Michal Jagiello | 8b8a4cf | 2022-12-22 08:45:18 +0000 | [diff] [blame] | 49 | python3.8 python3.8-dev python3-pip && \ |
Andreas Geissler | 8ada98c | 2023-02-03 13:28:42 +0100 | [diff] [blame] | 50 | ln -s /usr/bin/python3 /usr/bin/python && \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 51 | mkdir -p /var/opt/ONAP && \ |
Michal Jagiello | 8b8a4cf | 2022-12-22 08:45:18 +0000 | [diff] [blame] | 52 | pip3 install --no-cache-dir -r requirements.txt && \ |
| 53 | pip3 install --no-cache-dir \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 54 | 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 Kuzmicki | 590d66f | 2020-10-07 09:23:18 +0200 | [diff] [blame] | 56 | 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] | 57 | chmod +x /usr/local/bin/kubectl && \ |
| 58 | chmod 700 get_helm.sh && \ |
Krzysztof Kuzmicki | 55d91bc | 2022-03-17 15:00:46 +0100 | [diff] [blame] | 59 | ./get_helm.sh --version $HELM_VERSION && \ |
| 60 | mkdir -p /app && \ |
| 61 | cp /var/opt/ONAP/setup-hvves.sh /app |
| 62 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 63 | |
Michal Jagiello | 8b8a4cf | 2022-12-22 08:45:18 +0000 | [diff] [blame] | 64 | RUN python3.8 -m pip install --no-cache-dir setuptools wheel |
| 65 | RUN python3.8 -m pip install --no-cache-dir virtualenv |
stark, steven | ea4af0c | 2019-08-28 16:11:53 -0700 | [diff] [blame] | 66 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 67 | # Copy the robot code |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 68 | RUN mkdir -p /etc/lighttpd && \ |
| 69 | rm /etc/lighttpd/lighttpd.conf && \ |
| 70 | ln -s /var/opt/ONAP/docker/lighttpd.conf /etc/lighttpd/lighttpd.conf && \ |
| 71 | ln -s /var/opt/ONAP/docker/authorization /etc/lighttpd/authorization && \ |
| 72 | chmod 777 /var/opt/ONAP/setup.sh \ |
Puzikov Dmitry | 38bcba6 | 2019-02-15 16:58:35 +0100 | [diff] [blame] | 73 | && chmod 777 /var/opt/ONAP/runTags.sh \ |
| 74 | && chmod 777 /var/opt/ONAP/dnstraffic.sh \ |
| 75 | && chmod 777 /var/opt/ONAP/runSoak.sh \ |
| 76 | && chmod 777 /var/opt/ONAP/runEteTag.sh \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 77 | && chmod 600 /var/opt/ONAP/robot/assets/keys/* && \ |
| 78 | cd /var/opt/ONAP && ./setup.sh \ |
Puzikov Dmitry | 38bcba6 | 2019-02-15 16:58:35 +0100 | [diff] [blame] | 79 | && apt-get autoremove --assume-yes \ |
| 80 | && rm -rf /var/lib/apt/lists/* \ |
| 81 | && apt-get clean |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 82 | CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] |