Matteo Scandolo | 48d3d2d | 2017-08-08 13:05:27 -0700 | [diff] [blame] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
A.R Karthick | cfe5ae9 | 2017-01-13 16:01:20 -0800 | [diff] [blame] | 17 | FROM debian:jessie |
| 18 | MAINTAINER A R Karthick <kramanar@ciena.com> |
| 19 | |
| 20 | # Add Java 8 repository |
| 21 | ENV DEBIAN_FRONTEND noninteractive |
| 22 | RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ |
| 23 | echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ |
| 24 | echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ |
| 25 | apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 |
| 26 | |
| 27 | # Set the environment variables |
| 28 | ENV HOME /root |
| 29 | ENV JAVA_HOME /usr/lib/jvm/java-8-oracle |
| 30 | ENV ONOS_ROOT /src/onos |
A.R Karthick | dda2206 | 2017-02-09 14:39:20 -0800 | [diff] [blame] | 31 | ENV KARAF_VERSION 3.0.8 |
| 32 | ENV KARAF_ROOT /root/onos/apache-karaf-3.0.8 |
| 33 | 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] | 34 | ENV BUILD_NUMBER docker |
| 35 | ENV PATH $PATH:$KARAF_ROOT/bin |
| 36 | #Download and Build ONOS |
| 37 | RUN apt-get update && apt-get install -y python git less zip curl oracle-java8-installer oracle-java8-set-default |
| 38 | RUN mkdir -p /src |
| 39 | WORKDIR /src |
| 40 | CMD bash -c "git clone https://github.com/opennetworkinglab/onos.git && \ |
| 41 | cd onos && \ |
| 42 | tools/build/onos-buck build onos && \ |
| 43 | cp buck-out/gen/tools/package/onos-package/onos.tar.gz /root/cord-tester && \ |
| 44 | rm -rf /src/onos" |
| 45 | |