blob: 6103ce9539b5c1d51610b733c6fad4eba7859eed [file] [log] [blame]
A.R Karthickcfe5ae92017-01-13 16:01:20 -08001FROM debian:jessie
2MAINTAINER A R Karthick <kramanar@ciena.com>
3
4# Add Java 8 repository
5ENV DEBIAN_FRONTEND noninteractive
6RUN 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
12ENV HOME /root
13ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
14ENV ONOS_ROOT /src/onos
15ENV KARAF_VERSION 3.0.5
16ENV KARAF_ROOT /root/onos/apache-karaf-3.0.5
17ENV KARAF_LOG /root/onos/apache-karaf-3.0.5/data/log/karaf.log
18ENV BUILD_NUMBER docker
19ENV PATH $PATH:$KARAF_ROOT/bin
20#Download and Build ONOS
21RUN apt-get update && apt-get install -y python git less zip curl oracle-java8-installer oracle-java8-set-default
22RUN mkdir -p /src
23WORKDIR /src
24CMD 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