DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1 | FROM ubuntu |
| 2 | ## Be careful of Windows newlines |
| 3 | |
Brian Freeman | f6032df | 2019-02-18 09:59:12 -0500 | [diff] [blame^] | 4 | MAINTAINER "ONAP" |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 5 | |
Brian Freeman | f6032df | 2019-02-18 09:59:12 -0500 | [diff] [blame^] | 6 | LABEL name="Docker image for the ONAP Robot Testing Framework" |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 7 | LABEL usage="docker run -e ROBOT_TEST=<testname> -ti openecompete" |
| 8 | |
| 9 | # Install Python Pip, Robot framework, firefox, lighttpd web server, wget |
Jerry Flood | a9dad14 | 2017-10-11 12:39:25 -0400 | [diff] [blame] | 10 | # Restructuring so we can see where it fails in the build. |
| 11 | RUN apt-get update |
Jerry Flood | 27d5fe3 | 2018-03-05 09:39:32 -0500 | [diff] [blame] | 12 | RUN apt-get --assume-yes install python2.7 |
Jerry Flood | a9dad14 | 2017-10-11 12:39:25 -0400 | [diff] [blame] | 13 | RUN apt-get --assume-yes install build-essential |
| 14 | RUN apt-get --assume-yes install dbus |
| 15 | RUN apt-get --assume-yes install dnsutils |
| 16 | RUN apt-get --assume-yes install git |
| 17 | RUN apt-get --assume-yes install libappindicator1 |
| 18 | RUN apt-get --assume-yes install libffi-dev |
| 19 | RUN apt-get --assume-yes install libindicator7 |
| 20 | RUN apt-get --assume-yes install libssl-dev |
| 21 | RUN apt-get --assume-yes install libxss1 |
| 22 | RUN apt-get --assume-yes install lighttpd |
| 23 | RUN apt-get --assume-yes install net-tools |
| 24 | RUN apt-get --assume-yes install python-dev |
| 25 | RUN apt-get --assume-yes install python-pip |
| 26 | RUN apt-get --assume-yes install unzip |
| 27 | RUN apt-get --assume-yes install wget |
| 28 | RUN apt-get --assume-yes install xvfb |
Brian Freeman | 5449798 | 2018-09-14 17:06:15 -0500 | [diff] [blame] | 29 | RUN apt-get --assume-yes install xxd |
Jerry Flood | a9dad14 | 2017-10-11 12:39:25 -0400 | [diff] [blame] | 30 | RUN pip install --upgrade pip |
Yang Xu | 6237ee3 | 2018-12-16 22:51:46 -0500 | [diff] [blame] | 31 | RUN pip install robotframework==3.0.4 |
Jerry Flood | a9dad14 | 2017-10-11 12:39:25 -0400 | [diff] [blame] | 32 | RUN python --version |
Jerry Flood | 633a15d | 2017-06-02 16:46:11 -0400 | [diff] [blame] | 33 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 34 | # Install chrome |
| 35 | RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ |
| 36 | echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \ |
| 37 | apt-get update && \ |
| 38 | apt-get --assume-yes install google-chrome-stable |
| 39 | |
| 40 | # Copy the robot code |
Brian Freeman | f6032df | 2019-02-18 09:59:12 -0500 | [diff] [blame^] | 41 | COPY / /var/opt/ONAP/ |
Jerry Flood | 633a15d | 2017-06-02 16:46:11 -0400 | [diff] [blame] | 42 | COPY lighttpd.conf /etc/lighttpd/lighttpd.conf |
Gary Wu | 855a5a5 | 2018-10-25 11:23:44 -0700 | [diff] [blame] | 43 | COPY authorization /etc/lighttpd/authorization |
Brian Freeman | f6032df | 2019-02-18 09:59:12 -0500 | [diff] [blame^] | 44 | RUN chmod 777 /var/opt/ONAP/setup.sh && \ |
| 45 | chmod 777 /var/opt/ONAP/runTags.sh && \ |
| 46 | chmod 777 /var/opt/ONAP/dnstraffic.sh && \ |
| 47 | chmod 777 /var/opt/ONAP/runSoak.sh && \ |
| 48 | chmod 777 /var/opt/ONAP/runEteTag.sh |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 49 | |
Brian Freeman | f9d1579 | 2018-07-26 15:50:31 -0500 | [diff] [blame] | 50 | # Set mode for the SSH keys |
Brian Freeman | f6032df | 2019-02-18 09:59:12 -0500 | [diff] [blame^] | 51 | RUN chmod 600 /var/opt/ONAP/robot/assets/keys/* |
Brian Freeman | f9d1579 | 2018-07-26 15:50:31 -0500 | [diff] [blame] | 52 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 53 | # Update the ssh library so that it will run properly in the docker env |
Brian Freeman | f6032df | 2019-02-18 09:59:12 -0500 | [diff] [blame^] | 54 | RUN cd /var/opt/ONAP && ./setup.sh && apt-get clean |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 55 | |
| 56 | CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] |
| 57 | |
| 58 | |
| 59 | |