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 |
| 10 | ARG HEATBRIDGE_TAG=master |
| 11 | ARG PYTHON_UTILS_TAG=master |
| 12 | ARG DEMO_TAG=master |
Krzysztof Kuzmicki | 590d66f | 2020-10-07 09:23:18 +0200 | [diff] [blame] | 13 | ARG KUBERNETES_VERSION="v1.15.11" |
| 14 | |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 15 | |
| 16 | ARG TESTSUITE_REPO=git.onap.org/testsuite |
Brian Freeman | d2aa352 | 2020-11-24 09:41:38 -0500 | [diff] [blame] | 17 | #ARG HEATBRIDGE_REPO=git.onap.org/testsuite/heatbridge.git |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 18 | ARG PYTHON_UTILS_REPO=git.onap.org/testsuite/python-testing-utils.git |
| 19 | ARG DEMO_REPO=git.onap.org/demo |
| 20 | |
| 21 | COPY requirements.txt requirements.txt |
| 22 | |
Krzysztof Kuzmicki | 590d66f | 2020-10-07 09:23:18 +0200 | [diff] [blame] | 23 | # Install kubectl |
| 24 | # Note: Latest version may be found on: |
| 25 | # https://aur.archlinux.org/packages/kubectl-bin/ |
| 26 | ADD https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/amd64/kubectl /usr/local/bin/kubectl |
| 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 \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 43 | python2.7 python-dev python-setuptools python-wheel python-pip \ |
stark, steven | ea4af0c | 2019-08-28 16:11:53 -0700 | [diff] [blame] | 44 | netbase \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 45 | unzip zip \ |
| 46 | x11-utils x11-xserver-utils \ |
Puzikov Dmitry | 38bcba6 | 2019-02-15 16:58:35 +0100 | [diff] [blame] | 47 | xvfb \ |
Brian Freeman | 01d503a | 2019-04-10 14:51:59 -0500 | [diff] [blame] | 48 | xxd \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 49 | wget vim \ |
| 50 | python3.7 python3.7-dev python3-pip && \ |
| 51 | mkdir -p /var/opt/ONAP && \ |
Pratik raj | 309e87c | 2020-12-30 18:54:43 +0530 | [diff] [blame] | 52 | pip install --no-cache-dir -r requirements.txt && \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 53 | pip 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 && \ |
mrichomme | 82223ef | 2020-10-14 17:51:08 +0200 | [diff] [blame] | 57 | chmod +x /usr/local/bin/kubectl |
Brian Freeman | d2aa352 | 2020-11-24 09:41:38 -0500 | [diff] [blame] | 58 | # moved in case line extension with comment isnt supported |
| 59 | #git+https://$HEATBRIDGE_REPO@$HEATBRIDGE_TAG#egg=heatbridge\&subdirectory=heatbridge \ |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 60 | |
Pratik raj | 309e87c | 2020-12-30 18:54:43 +0530 | [diff] [blame] | 61 | RUN python3.7 -m pip install --no-cache-dir setuptools wheel |
| 62 | RUN python3.7 -m pip install --no-cache-dir virtualenv |
stark, steven | ea4af0c | 2019-08-28 16:11:53 -0700 | [diff] [blame] | 63 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 64 | # Copy the robot code |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 65 | RUN 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 Dmitry | 38bcba6 | 2019-02-15 16:58:35 +0100 | [diff] [blame] | 70 | && 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 \ |
mrichomme | 83a352f | 2020-04-06 18:04:22 +0200 | [diff] [blame] | 74 | && chmod 600 /var/opt/ONAP/robot/assets/keys/* && \ |
| 75 | cd /var/opt/ONAP && ./setup.sh \ |
Puzikov Dmitry | 38bcba6 | 2019-02-15 16:58:35 +0100 | [diff] [blame] | 76 | && apt-get autoremove --assume-yes \ |
| 77 | && rm -rf /var/lib/apt/lists/* \ |
| 78 | && apt-get clean |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 79 | CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] |