Andy Bavier | 6a9fb8e | 2016-06-24 17:49:00 -0400 | [diff] [blame] | 1 | FROM debian:jessie |
| 2 | MAINTAINER Andy Bavier <andy@onlab.us> |
| 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 |
| 15 | ENV KARAF_VERSION 3.0.5 |
| 16 | ENV KARAF_ROOT /root/onos/apache-karaf-3.0.5 |
| 17 | ENV KARAF_LOG /root/onos/apache-karaf-3.0.5/data/log/karaf.log |
| 18 | ENV BUILD_NUMBER docker |
| 19 | ENV PATH $PATH:$KARAF_ROOT/bin |
| 20 | |
| 21 | #Download build environment for ONOS |
| 22 | WORKDIR /src |
| 23 | RUN 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 | |
| 26 | RUN echo ". /src/onos/tools/dev/bash_profile" >> /root/.bashrc |