blob: 0bd5550c26d03d1b05120ba2941987e4bfd31015 [file] [log] [blame]
Andy Bavier6a9fb8e2016-06-24 17:49:00 -04001FROM debian:jessie
2MAINTAINER Andy Bavier <andy@onlab.us>
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
21#Download build environment for ONOS
22WORKDIR /src
23RUN apt-get update && apt-get install -y python maven git curl oracle-java8-installer oracle-java8-set-default && \
24 git clone https://github.com/opennetworkinglab/onos.git && cd onos
25
26RUN echo ". /src/onos/tools/dev/bash_profile" >> /root/.bashrc