blob: 8a793c61002c328e1745a434f6ac42a302757b46 [file] [log] [blame]
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# 8.11 == jessie
FROM debian:8.11
MAINTAINER A R Karthick <kramanar@ciena.com>
# Add Java 8 repository
ENV DEBIAN_FRONTEND noninteractive
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
# Set the environment variables
ENV HOME /root
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV ONOS_ROOT /src/onos
ENV KARAF_VERSION 3.0.8
ENV KARAF_ROOT /root/onos/apache-karaf-3.0.8
ENV KARAF_LOG /root/onos/apache-karaf-3.0.8/data/log/karaf.log
ENV BUILD_NUMBER docker
ENV PATH $PATH:$KARAF_ROOT/bin
#Download and Build ONOS
RUN apt-get update && apt-get install -y python git less zip curl oracle-java8-installer oracle-java8-set-default
RUN mkdir -p /src
WORKDIR /src
CMD bash -c "git clone https://github.com/opennetworkinglab/onos.git && \
cd onos && \
tools/build/onos-buck build onos && \
cp buck-out/gen/tools/package/onos-package/onos.tar.gz /root/cord-tester && \
rm -rf /src/onos"