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 | |
Andy Bavier | 51ec3d5 | 2018-07-05 17:02:00 -0700 | [diff] [blame^] | 17 | # 8.11 == jessie |
| 18 | FROM debian:8.11 |
A.R Karthick | cfe5ae9 | 2017-01-13 16:01:20 -0800 | [diff] [blame] | 19 | MAINTAINER A R Karthick <kramanar@ciena.com> |
| 20 | |
| 21 | # Add Java 8 repository |
| 22 | ENV DEBIAN_FRONTEND noninteractive |
| 23 | RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ |
| 24 | echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ |
| 25 | echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ |
| 26 | apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 |
| 27 | |
| 28 | # Set the environment variables |
| 29 | ENV HOME /root |
| 30 | ENV JAVA_HOME /usr/lib/jvm/java-8-oracle |
| 31 | ENV ONOS_ROOT /src/onos |
A.R Karthick | dda2206 | 2017-02-09 14:39:20 -0800 | [diff] [blame] | 32 | ENV KARAF_VERSION 3.0.8 |
| 33 | ENV KARAF_ROOT /root/onos/apache-karaf-3.0.8 |
| 34 | 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] | 35 | ENV BUILD_NUMBER docker |
| 36 | ENV PATH $PATH:$KARAF_ROOT/bin |
| 37 | #Download and Build ONOS |
| 38 | RUN apt-get update && apt-get install -y python git less zip curl oracle-java8-installer oracle-java8-set-default |
| 39 | RUN mkdir -p /src |
| 40 | WORKDIR /src |
| 41 | CMD bash -c "git clone https://github.com/opennetworkinglab/onos.git && \ |
| 42 | cd onos && \ |
| 43 | tools/build/onos-buck build onos && \ |
| 44 | cp buck-out/gen/tools/package/onos-package/onos.tar.gz /root/cord-tester && \ |
| 45 | rm -rf /src/onos" |
| 46 | |