blob: 096faa910a0dd70ef9990f022ec0ab63a7fea1d8 [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
A.R Karthickdda22062017-02-09 14:39:20 -080015ENV KARAF_VERSION 3.0.8
16ENV KARAF_ROOT /root/onos/apache-karaf-3.0.8
17ENV KARAF_LOG /root/onos/apache-karaf-3.0.8/data/log/karaf.log
A.R Karthickcfe5ae92017-01-13 16:01:20 -080018ENV 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