blob: 08cebf29457a04b4419eae0e70c1a68a10bca3da [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
A.R Karthickcfe5ae92017-01-13 16:01:20 -080017FROM debian:jessie
18MAINTAINER A R Karthick <kramanar@ciena.com>
19
20# Add Java 8 repository
21ENV DEBIAN_FRONTEND noninteractive
22RUN 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
28ENV HOME /root
29ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
30ENV ONOS_ROOT /src/onos
A.R Karthickdda22062017-02-09 14:39:20 -080031ENV KARAF_VERSION 3.0.8
32ENV KARAF_ROOT /root/onos/apache-karaf-3.0.8
33ENV KARAF_LOG /root/onos/apache-karaf-3.0.8/data/log/karaf.log
A.R Karthickcfe5ae92017-01-13 16:01:20 -080034ENV BUILD_NUMBER docker
35ENV PATH $PATH:$KARAF_ROOT/bin
36#Download and Build ONOS
37RUN apt-get update && apt-get install -y python git less zip curl oracle-java8-installer oracle-java8-set-default
38RUN mkdir -p /src
39WORKDIR /src
40CMD 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