blob: 08e268842add5efe270f06cb7ad2d0c048788a88 [file] [log] [blame]
alshabib187f1722015-06-23 16:15:50 -07001FROM debian
2MAINTAINER Ali Al-Shabibi <ali@onlab.us>
3
4# Install required software
5ENV DEBIAN_FRONTEND noninteractive
6RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
7 echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
8 echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
9 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \
10 apt-get update && \
11 apt-get install -y oracle-java8-installer oracle-java8-set-default maven git curl && \
12 apt-get clean && apt-get purge
13
14# Set the environment variables
15ENV HOME /root
16ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
17ENV ONOS_ROOT /src/onos
18ENV KARAF_VERSION 3.0.3
19ENV KARAF_ROOT /root/onos/apache-karaf-3.0.3
20ENV KARAF_LOG /root/onos/apache-karaf-3.0.3/data/log/karaf.log
21ENV BUILD_NUMBER docker
22ENV PATH $PATH:$KARAF_ROOT/bin
23
24
25# Change to /src directory
26WORKDIR /src
27
28# Download ONOS
29RUN git clone https://github.com/opennetworkinglab/onos.git
30
31#Install ONOS
32WORKDIR /src/onos
33RUN mkdir -p /root/Downloads && \
34 mvn clean install && \
35 ./tools/build/onos-package
36
37# Change to /root directory
38WORKDIR /root
39
40RUN mkdir onos && \
41 cp /tmp/onos-*.docker.tar.gz . && \
42 tar -xf onos-*.docker.tar.gz -C onos --strip-components=1 && \
43 rm -rf onos-*.docker.tar.gz
44
45
46# Ports
47# 6633 - OpenFlow
48# 8181 - GUI
49# 8101 - ONOS CLI
50# 9876 - ONOS CLUSTER COMMUNICATION
51EXPOSE 6633 8181 8101 9876
52
53# Get ready to run command
54WORKDIR /root/onos
55CMD ["./bin/onos-service"]