summaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/build/docker
diff options
context:
space:
mode:
authorAshlee Young <ashlee@onosfw.com>2015-09-09 22:15:21 -0700
committerAshlee Young <ashlee@onosfw.com>2015-09-09 22:15:21 -0700
commit13d05bc8458758ee39cb829098241e89616717ee (patch)
tree22a4d1ce65f15952f07a3df5af4b462b4697cb3a /framework/src/onos/tools/build/docker
parent6139282e1e93c2322076de4b91b1c85d0bc4a8b3 (diff)
ONOS checkin based on commit tag e796610b1f721d02f9b0e213cf6f7790c10ecd60
Change-Id: Ife8810491034fe7becdba75dda20de4267bd15cd
Diffstat (limited to 'framework/src/onos/tools/build/docker')
-rw-r--r--framework/src/onos/tools/build/docker/Dockerfile56
1 files changed, 56 insertions, 0 deletions
diff --git a/framework/src/onos/tools/build/docker/Dockerfile b/framework/src/onos/tools/build/docker/Dockerfile
new file mode 100644
index 00000000..fd61ad86
--- /dev/null
+++ b/framework/src/onos/tools/build/docker/Dockerfile
@@ -0,0 +1,56 @@
+FROM debian
+MAINTAINER Ali Al-Shabibi <ali@onlab.us>
+
+# 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.3
+ENV KARAF_ROOT /root/onos/apache-karaf-3.0.3
+ENV KARAF_LOG /root/onos/apache-karaf-3.0.3/data/log/karaf.log
+ENV BUILD_NUMBER docker
+ENV PATH $PATH:$KARAF_ROOT/bin
+
+#Download and Build ONOS
+WORKDIR /src
+RUN apt-get update && apt-get install -y maven git curl oracle-java8-installer oracle-java8-set-default && \
+ git clone https://github.com/opennetworkinglab/onos.git && cd onos && \
+ mkdir -p /root/Downloads && \
+ mvn clean install && \
+ tools/build/onos-package && \
+ rm -rf /root/.m2 && cd .. && \
+ rm -rf onos && \
+ apt-get remove --purge -y `apt-mark showauto` && \
+ apt-get install oracle-java8-set-default -y && \
+ apt-get clean && apt-get purge -y && apt-get autoremove -y && \
+ rm -rf /var/lib/apt/lists/* && \
+ rm -rf /var/cache/oracle-jdk8-installer && \
+ rm -rf /root/Downloads
+
+# Change to /root directory
+WORKDIR /root
+
+#Install ONOS
+RUN mkdir onos && \
+ mv /tmp/onos-*.docker.tar.gz . && \
+ tar -xf onos-*.docker.tar.gz -C onos --strip-components=1 && \
+ rm -rf onos-*.docker.tar.gz
+
+
+# Ports
+# 6633 - OpenFlow
+# 8181 - GUI
+# 8101 - ONOS CLI
+# 9876 - ONOS CLUSTER COMMUNICATION
+EXPOSE 6633 8181 8101 9876
+
+# Get ready to run command
+WORKDIR /root/onos
+ENTRYPOINT ["./bin/onos-service"]