blob: 8a793c61002c328e1745a434f6ac42a302757b46 [file] [log] [blame]
Matteo Scandolo48d3d2d2017-08-08 13:05:27 -07001
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 Bavier51ec3d52018-07-05 17:02:00 -070017# 8.11 == jessie
18FROM debian:8.11
A.R Karthickcfe5ae92017-01-13 16:01:20 -080019MAINTAINER A R Karthick <kramanar@ciena.com>
20
21# Add Java 8 repository
22ENV DEBIAN_FRONTEND noninteractive
23RUN 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
29ENV HOME /root
30ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
31ENV ONOS_ROOT /src/onos
A.R Karthickdda22062017-02-09 14:39:20 -080032ENV KARAF_VERSION 3.0.8
33ENV KARAF_ROOT /root/onos/apache-karaf-3.0.8
34ENV KARAF_LOG /root/onos/apache-karaf-3.0.8/data/log/karaf.log
A.R Karthickcfe5ae92017-01-13 16:01:20 -080035ENV BUILD_NUMBER docker
36ENV PATH $PATH:$KARAF_ROOT/bin
37#Download and Build ONOS
38RUN apt-get update && apt-get install -y python git less zip curl oracle-java8-installer oracle-java8-set-default
39RUN mkdir -p /src
40WORKDIR /src
41CMD 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