A.R Karthick | cfe5ae9 | 2017-01-13 16:01:20 -0800 | [diff] [blame] | 1 | FROM debian:jessie |
| 2 | MAINTAINER A R Karthick <kramanar@ciena.com> |
| 3 | |
| 4 | # Add Java 8 repository |
| 5 | ENV DEBIAN_FRONTEND noninteractive |
| 6 | RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ |
| 7 | echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ |
| 8 | echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ |
| 9 | apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 |
| 10 | |
| 11 | # Set the environment variables |
| 12 | ENV HOME /root |
| 13 | ENV JAVA_HOME /usr/lib/jvm/java-8-oracle |
| 14 | ENV ONOS_ROOT /src/onos |
A.R Karthick | dda2206 | 2017-02-09 14:39:20 -0800 | [diff] [blame] | 15 | ENV KARAF_VERSION 3.0.8 |
| 16 | ENV KARAF_ROOT /root/onos/apache-karaf-3.0.8 |
| 17 | ENV KARAF_LOG /root/onos/apache-karaf-3.0.8/data/log/karaf.log |
A.R Karthick | cfe5ae9 | 2017-01-13 16:01:20 -0800 | [diff] [blame] | 18 | ENV BUILD_NUMBER docker |
| 19 | ENV PATH $PATH:$KARAF_ROOT/bin |
| 20 | #Download and Build ONOS |
| 21 | RUN apt-get update && apt-get install -y python git less zip curl oracle-java8-installer oracle-java8-set-default |
| 22 | RUN mkdir -p /src |
| 23 | WORKDIR /src |
| 24 | CMD bash -c "git clone https://github.com/opennetworkinglab/onos.git && \ |
| 25 | cd onos && \ |
| 26 | tools/build/onos-buck build onos && \ |
| 27 | cp buck-out/gen/tools/package/onos-package/onos.tar.gz /root/cord-tester && \ |
| 28 | rm -rf /src/onos" |
| 29 | |